mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-12 20:27:53 +00:00
Add option to skip splash screen fade out
This commit is contained in:
parent
a15de57e58
commit
66df00cee2
6 changed files with 26 additions and 4 deletions
|
@ -47,6 +47,7 @@ typedef struct LG_RendererParams
|
|||
// TTF_Font * font;
|
||||
// TTF_Font * alertFont;
|
||||
bool showFPS;
|
||||
bool quickSplash;
|
||||
}
|
||||
LG_RendererParams;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -151,6 +151,7 @@ struct AppParams
|
|||
SDL_Scancode escapeKey;
|
||||
bool showAlerts;
|
||||
bool captureOnStart;
|
||||
bool quickSplash;
|
||||
|
||||
unsigned int cursorPollInterval;
|
||||
unsigned int framePollInterval;
|
||||
|
|
Loading…
Reference in a new issue