mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-02-24 12:21:22 +00:00
[client] spice: show message when connected to the wrong guest
This commit is contained in:
parent
780cf5f362
commit
d42e409728
2 changed files with 15 additions and 3 deletions
|
@ -805,8 +805,14 @@ static void checkUUID(void)
|
|||
sizeof(g_state.spiceUUID)) == 0)
|
||||
return;
|
||||
|
||||
DEBUG_ERROR("UUIDs do not match, you have connected SPICE to the wrong guest");
|
||||
g_state.state = APP_STATE_SHUTDOWN;
|
||||
app_msgBox(
|
||||
"SPICE Configuration Error",
|
||||
"You have connected SPICE to the wrong guest.\n"
|
||||
"Input will not function until this is corrected.");
|
||||
|
||||
g_params.useSpiceInput = false;
|
||||
g_state.spiceClose = true;
|
||||
purespice_disconnect();
|
||||
}
|
||||
|
||||
void spiceReady(void)
|
||||
|
@ -899,7 +905,12 @@ int spiceThread(void * arg)
|
|||
end:
|
||||
|
||||
audio_free();
|
||||
g_state.state = APP_STATE_SHUTDOWN;
|
||||
|
||||
// if the connection was disconnected intentionally we don't want to shutdown
|
||||
// so that the user can see the message box and take action
|
||||
if (!g_state.spiceClose)
|
||||
g_state.state = APP_STATE_SHUTDOWN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@ struct AppState
|
|||
LG_RendererRect dstRect;
|
||||
bool posInfoValid;
|
||||
bool alignToGuest;
|
||||
bool spiceClose;
|
||||
|
||||
LG_Renderer * lgr;
|
||||
atomic_int lgrResize;
|
||||
|
|
Loading…
Add table
Reference in a new issue