mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Fix USE_OPENGL=0 RENDERTYPE=WIN and USE_OPENGL=0 SDL_TARGET=1 builds.
git-svn-id: https://svn.eduke32.com/eduke32@5954 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
158fcb5e01
commit
d232f2364b
3 changed files with 8 additions and 12 deletions
|
@ -500,7 +500,6 @@ int32_t main(int32_t argc, char *argv[])
|
|||
}
|
||||
|
||||
|
||||
int setvsync(int newSync);
|
||||
#if SDL_MAJOR_VERSION != 1
|
||||
int setvsync(int newSync)
|
||||
{
|
||||
|
@ -539,7 +538,7 @@ int setvsync(int newSync)
|
|||
OSD_Printf("restartvid: Reset failed...\n");
|
||||
}
|
||||
|
||||
return vsync_renderlayer;
|
||||
return newSync;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@ HWND win_gethwnd(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
int setvsync(int newSync)
|
||||
{
|
||||
if (vsync_renderlayer == newSync)
|
||||
|
@ -67,9 +66,8 @@ int setvsync(int newSync)
|
|||
if (setgamemode(fullscreen, xdim, ydim, bpp))
|
||||
OSD_Printf("restartvid: Reset failed...\n");
|
||||
|
||||
return vsync_renderlayer;
|
||||
return newSync;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t sdlayer_checkversion(void)
|
||||
{
|
||||
|
|
|
@ -130,9 +130,7 @@ int32_t bpp=0;
|
|||
int32_t bytesperline=0;
|
||||
int32_t lockcount=0;
|
||||
int32_t glcolourdepth=32;
|
||||
#ifdef USE_OPENGL
|
||||
static int32_t vsync_renderlayer;
|
||||
#endif
|
||||
uint32_t maxrefreshfreq=60;
|
||||
intptr_t frameplace=0;
|
||||
char modechange=1;
|
||||
|
@ -589,9 +587,7 @@ void uninitsystem(void)
|
|||
//
|
||||
void system_getcvars(void)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
setvsync(vsync);
|
||||
#endif
|
||||
vsync = setvsync(vsync);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1725,22 +1721,25 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs)
|
|||
|
||||
#define CHECK(w,h) if ((w < maxx) && (h < maxy))
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
int setvsync(int newSync)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
if (!glinfo.vsync)
|
||||
{
|
||||
vsync_renderlayer = 0;
|
||||
return 0;
|
||||
}
|
||||
vsync_renderlayer = newSync;
|
||||
# ifdef USE_GLEXT
|
||||
bwglSwapIntervalEXT(newSync);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
vsync_renderlayer = newSync;
|
||||
|
||||
return newSync;
|
||||
}
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
static void cdsenummodes(void)
|
||||
{
|
||||
DEVMODE dm;
|
||||
|
|
Loading…
Reference in a new issue