Add option to skip splash screen fade out

This commit is contained in:
Jonathan Rubenstein authored and Geoffrey McRae committed 2020-10-09 03:28:58 +11:00
1 parent a15de57e58
commit 66df00cee2
6 files changed
+26 -4

No files matched your search

+1
View File
@@ -47,6 +47,7 @@ typedef struct LG_RendererParams
// TTF_Font * font;
// TTF_Font * alertFont;
bool showFPS;
bool quickSplash;
}
LG_RendererParams;
+6 -1
View File
@@ -549,7 +549,12 @@ bool egl_render(void * opaque, SDL_Window * window)
this->useNearest))
{
if (!this->waitFadeTime)
this->waitFadeTime = microtime() + SPLASH_FADE_TIME;
{
if (!this->params.quickSplash)
this->waitFadeTime = microtime() + SPLASH_FADE_TIME;
else
this->waitDone = true;
}
egl_cursor_render(this->cursor);
}
+8 -2
View File
@@ -413,8 +413,14 @@ bool opengl_on_frame_event(void * opaque, const LG_RendererFormat format, const
if (this->waiting)
{
this->waiting = false;
this->waitFadeTime = microtime() + FADE_TIME;
this->waiting = false;
if (!this->params.quickSplash)
this->waitFadeTime = microtime() + FADE_TIME;
else
{
glDisable(GL_MULTISAMPLE);
this->waitDone = true;
}
}
return true;
+8
View File
@@ -213,6 +213,13 @@ static struct Option options[] =
.type = OPTION_TYPE_BOOL,
.value.x_bool = true,
},
{
.module = "win",
.name = "quickSplash",
.description = "Skip fading out the splash screen when a connection is established",
.type = OPTION_TYPE_BOOL,
.value.x_bool = false,
},
// input options
{
@@ -401,6 +408,7 @@ bool config_load(int argc, char * argv[])
params.ignoreQuit = option_get_bool ("win", "ignoreQuit" );
params.noScreensaver = option_get_bool ("win", "noScreensaver");
params.showAlerts = option_get_bool ("win", "alerts" );
params.quickSplash = option_get_bool ("win", "quickSplash" );
params.grabKeyboard = option_get_bool ("input", "grabKeyboard");
params.escapeKey = option_get_int ("input", "escapeKey" );
+2 -1
View File
@@ -1284,7 +1284,8 @@ static int lg_run()
// select and init a renderer
LG_RendererParams lgrParams;
lgrParams.showFPS = params.showFPS;
lgrParams.showFPS = params.showFPS;
lgrParams.quickSplash = params.quickSplash;
Uint32 sdlFlags;
if (params.forceRenderer)
+1
View File
@@ -151,6 +151,7 @@ struct AppParams
SDL_Scancode escapeKey;
bool showAlerts;
bool captureOnStart;
bool quickSplash;
unsigned int cursorPollInterval;
unsigned int framePollInterval;