[client] added back missing vsync disable option

This commit is contained in:
Geoffrey McRae 2017-12-15 16:19:47 +11:00
parent d1bd5b3115
commit 0d8b2449cf
2 changed files with 11 additions and 3 deletions

View File

@ -41,6 +41,7 @@ typedef struct LG_RendererParams
TTF_Font * font;
bool showFPS;
bool resample;
bool vsync;
}
LG_RendererParams;
@ -97,4 +98,4 @@ typedef struct LG_Renderer
LG_RendererOnFrameEvent on_frame_event;
LG_RendererRender render;
}
LG_Renderer;
LG_Renderer;

View File

@ -63,6 +63,7 @@ struct AppState
struct AppParams
{
bool vsync;
bool autoResize;
bool allowResize;
bool keepAspect;
@ -84,6 +85,7 @@ struct AppParams
struct AppState state;
struct AppParams params =
{
.vsync = true,
.autoResize = false,
.allowResize = true,
.keepAspect = true,
@ -631,6 +633,7 @@ int run()
lgrParams.font = state.font;
lgrParams.resample = params.useMipmap;
lgrParams.showFPS = params.showFPS;
lgrParams.vsync = params.vsync;
Uint32 sdlFlags;
// probe for a a suitable renderer
@ -846,7 +849,7 @@ void doHelp(char * app)
" -M Don't hide the host cursor\n"
"\n"
" -m Disable mipmapping\n"
" -v Disable VSync\n"
" -v Disable VSYNC\n"
" -k Enable FPS display\n"
"\n"
" -a Auto resize the window to the guest\n"
@ -900,7 +903,7 @@ void doLicense()
int main(int argc, char * argv[])
{
int c;
while((c = getopt(argc, argv, "hf:sc:p:jMmkanrdFx:y:w:b:l")) != -1)
while((c = getopt(argc, argv, "hf:sc:p:jMmvkanrdFx:y:w:b:l")) != -1)
switch(c)
{
case '?':
@ -937,6 +940,10 @@ int main(int argc, char * argv[])
params.useMipmap = false;
break;
case 'v':
params.vsync = false;
break;
case 'k':
params.showFPS = true;
break;