forked from mirrors/principia
Minor vsync'ing cleanups
This commit is contained in:
parent
c4d8ed02e2
commit
006f12e8d6
6 changed files with 0 additions and 18 deletions
|
|
@ -16,15 +16,12 @@ loading_screen::loading_screen()
|
||||||
int
|
int
|
||||||
loading_screen::pause(void)
|
loading_screen::pause(void)
|
||||||
{
|
{
|
||||||
#ifdef TMS_BACKEND_PC
|
|
||||||
/* return the pervious vsync status */
|
|
||||||
if (settings["vsync"]->v.b) {
|
if (settings["vsync"]->v.b) {
|
||||||
if (SDL_GL_SetSwapInterval(-1) == -1)
|
if (SDL_GL_SetSwapInterval(-1) == -1)
|
||||||
SDL_GL_SetSwapInterval(1);
|
SDL_GL_SetSwapInterval(1);
|
||||||
} else {
|
} else {
|
||||||
SDL_GL_SetSwapInterval(0);
|
SDL_GL_SetSwapInterval(0);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
tms_infof("pause loading");
|
tms_infof("pause loading");
|
||||||
return T_OK;
|
return T_OK;
|
||||||
|
|
@ -33,11 +30,6 @@ loading_screen::pause(void)
|
||||||
int
|
int
|
||||||
loading_screen::resume(void)
|
loading_screen::resume(void)
|
||||||
{
|
{
|
||||||
#ifdef TMS_BACKEND_PC
|
|
||||||
/* Disable vsync during loading screen */
|
|
||||||
SDL_GL_SetSwapInterval(0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
tms_infof("resume loading -----------------------------------");
|
tms_infof("resume loading -----------------------------------");
|
||||||
this->step = 0;
|
this->step = 0;
|
||||||
return T_OK;
|
return T_OK;
|
||||||
|
|
|
||||||
|
|
@ -385,8 +385,6 @@ tbackend_init_surface()
|
||||||
|
|
||||||
SDL_GL_CreateContext(_window);
|
SDL_GL_CreateContext(_window);
|
||||||
|
|
||||||
SDL_GL_SetSwapInterval(0);
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,6 @@ tbackend_init_surface()
|
||||||
|
|
||||||
SDL_GL_CreateContext(_window);
|
SDL_GL_CreateContext(_window);
|
||||||
|
|
||||||
//SDL_GL_SetSwapInterval(0);
|
|
||||||
|
|
||||||
return T_OK;
|
return T_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,8 +132,6 @@ tbackend_init_surface()
|
||||||
|
|
||||||
SDL_GL_CreateContext(_window);
|
SDL_GL_CreateContext(_window);
|
||||||
|
|
||||||
SDL_GL_SetSwapInterval(0);
|
|
||||||
|
|
||||||
return T_OK;
|
return T_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -194,8 +194,6 @@ tbackend_init_surface()
|
||||||
|
|
||||||
SDL_GL_CreateContext(_window);
|
SDL_GL_CreateContext(_window);
|
||||||
|
|
||||||
SDL_GL_SetSwapInterval(0);
|
|
||||||
|
|
||||||
//#include "glhacks/definc.h"
|
//#include "glhacks/definc.h"
|
||||||
|
|
||||||
return T_OK;
|
return T_OK;
|
||||||
|
|
|
||||||
|
|
@ -383,8 +383,6 @@ tbackend_init_surface()
|
||||||
|
|
||||||
SDL_GL_CreateContext(_window);
|
SDL_GL_CreateContext(_window);
|
||||||
|
|
||||||
SDL_GL_SetSwapInterval(0);
|
|
||||||
|
|
||||||
return T_OK;
|
return T_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue