Skip to content

Commit

Permalink
[client] app: add option to disable the waiting for host message
Browse files Browse the repository at this point in the history
  • Loading branch information
RodoMa92 committed Nov 5, 2024
1 parent e25492a commit 354be42
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 40 deletions.
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ Zenithal <[email protected]> (ZenithalHourlyRate)
Kamplom <[email protected]> (kamplom)
Jacob McNamee <[email protected]> (jacobmcnamee)
Marco Antonio J. Costa <[email protected]> (majcosta)
rs189 <[email protected]> (rs189)
rs189 <[email protected]> (rs189)
Marco Rodolfi <[email protected]>(RodoMa92)
62 changes: 35 additions & 27 deletions client/src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,13 @@ static struct Option options[] =
.type = OPTION_TYPE_BOOL,
.value.x_bool = true
},
{
.module = "win",
.name = "disableWaitingMessage",
.description = "Disable the waiting for host message during startup",
.type = OPTION_TYPE_BOOL,
.value.x_bool = false
},

// input options
{
Expand Down Expand Up @@ -651,33 +658,34 @@ bool config_load(int argc, char * argv[])
}

// setup the application params for the basic types
g_params.cursorPollInterval = option_get_int ("app" , "cursorPollInterval");
g_params.framePollInterval = option_get_int ("app" , "framePollInterval" );
g_params.allowDMA = option_get_bool ("app" , "allowDMA" );

g_params.windowTitle = option_get_string("win", "title" );
g_params.appId = option_get_string("win", "appId" );
g_params.autoResize = option_get_bool ("win", "autoResize" );
g_params.allowResize = option_get_bool ("win", "allowResize" );
g_params.keepAspect = option_get_bool ("win", "keepAspect" );
g_params.forceAspect = option_get_bool ("win", "forceAspect" );
g_params.dontUpscale = option_get_bool ("win", "dontUpscale" );
g_params.intUpscale = option_get_bool ("win", "intUpscale" );
g_params.shrinkOnUpscale = option_get_bool ("win", "shrinkOnUpscale" );
g_params.borderless = option_get_bool ("win", "borderless" );
g_params.fullscreen = option_get_bool ("win", "fullScreen" );
g_params.maximize = option_get_bool ("win", "maximize" );
g_params.fpsMin = option_get_int ("win", "fpsMin" );
g_params.ignoreQuit = option_get_bool ("win", "ignoreQuit" );
g_params.noScreensaver = option_get_bool ("win", "noScreensaver" );
g_params.autoScreensaver = option_get_bool ("win", "autoScreensaver" );
g_params.showAlerts = option_get_bool ("win", "alerts" );
g_params.quickSplash = option_get_bool ("win", "quickSplash" );
g_params.overlayDim = option_get_bool ("win", "overlayDimsDesktop");
g_params.uiFont = option_get_string("win", "uiFont" );
g_params.uiSize = option_get_int ("win", "uiSize" );
g_params.jitRender = option_get_bool ("win", "jitRender" );
g_params.requestActivation = option_get_bool ("win", "requestActivation" );
g_params.cursorPollInterval = option_get_int ("app" , "cursorPollInterval");
g_params.framePollInterval = option_get_int ("app" , "framePollInterval" );
g_params.allowDMA = option_get_bool ("app" , "allowDMA" );

g_params.windowTitle = option_get_string("win", "title" );
g_params.appId = option_get_string("win", "appId" );
g_params.autoResize = option_get_bool ("win", "autoResize" );
g_params.allowResize = option_get_bool ("win", "allowResize" );
g_params.keepAspect = option_get_bool ("win", "keepAspect" );
g_params.forceAspect = option_get_bool ("win", "forceAspect" );
g_params.dontUpscale = option_get_bool ("win", "dontUpscale" );
g_params.intUpscale = option_get_bool ("win", "intUpscale" );
g_params.shrinkOnUpscale = option_get_bool ("win", "shrinkOnUpscale" );
g_params.borderless = option_get_bool ("win", "borderless" );
g_params.fullscreen = option_get_bool ("win", "fullScreen" );
g_params.maximize = option_get_bool ("win", "maximize" );
g_params.fpsMin = option_get_int ("win", "fpsMin" );
g_params.ignoreQuit = option_get_bool ("win", "ignoreQuit" );
g_params.noScreensaver = option_get_bool ("win", "noScreensaver" );
g_params.autoScreensaver = option_get_bool ("win", "autoScreensaver" );
g_params.showAlerts = option_get_bool ("win", "alerts" );
g_params.quickSplash = option_get_bool ("win", "quickSplash" );
g_params.overlayDim = option_get_bool ("win", "overlayDimsDesktop");
g_params.uiFont = option_get_string("win", "uiFont" );
g_params.uiSize = option_get_int ("win", "uiSize" );
g_params.jitRender = option_get_bool ("win", "jitRender" );
g_params.requestActivation = option_get_bool ("win", "requestActivation" );
g_params.disableWaitingMessage = option_get_bool ("win", "disableWaitingMessage");

if (g_params.noScreensaver && g_params.autoScreensaver)
{
Expand Down
27 changes: 15 additions & 12 deletions client/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1497,18 +1497,21 @@ static int lg_run(void)
if (waitCount == 30)
{
DEBUG_BREAK();
msgs[msgsCount++] = app_msgBox(
"Host Application Not Running",
"It seems the host application is not running or your\n"
"virtual machine is still starting up\n"
"\n"
"If the the VM is running and booted please check the\n"
"host application log for errors. You can find the\n"
"log through the shortcut in your start menu\n"
"\n"
"Continuing to wait...");

msgs[msgsCount++] = showSpiceInputHelp();
if (!g_params.disableWaitingMessage)
{
msgs[msgsCount++] = app_msgBox(
"Host Application Not Running",
"It seems the host application is not running or your\n"
"virtual machine is still starting up\n"
"\n"
"If the the VM is running and booted please check the\n"
"host application log for errors. You can find the\n"
"log through the shortcut in your start menu\n"
"\n"
"Continuing to wait...");

msgs[msgsCount++] = showSpiceInputHelp();
}

DEBUG_INFO("Check the host log in your guest at %%ProgramData%%\\Looking Glass (host)\\looking-glass-host.txt");
DEBUG_INFO("Continuing to wait...");
Expand Down
1 change: 1 addition & 0 deletions client/src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ struct AppParams
int uiSize;
bool jitRender;
bool requestActivation;
bool disableWaitingMessage;

unsigned int cursorPollInterval;
unsigned int framePollInterval;
Expand Down

0 comments on commit 354be42

Please sign in to comment.