mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
parent
0a9a9ed57e
commit
32fbcaffd2
@ -920,6 +920,19 @@ int spiceThread(void * arg)
|
||||
}
|
||||
}
|
||||
|
||||
// send key up events for any pressed keys
|
||||
if (g_params.useSpiceInput)
|
||||
{
|
||||
for(int scancode = 0; scancode < KEY_MAX; ++scancode)
|
||||
if (g_state.keyDown[scancode])
|
||||
{
|
||||
g_state.keyDown[scancode] = false;
|
||||
purespice_keyUp(scancode);
|
||||
}
|
||||
}
|
||||
|
||||
purespice_disconnect();
|
||||
|
||||
end:
|
||||
|
||||
audio_free();
|
||||
@ -1540,6 +1553,10 @@ restart:
|
||||
static void lg_shutdown(void)
|
||||
{
|
||||
g_state.state = APP_STATE_SHUTDOWN;
|
||||
|
||||
if (t_spice)
|
||||
lgJoinThread(t_spice, NULL);
|
||||
|
||||
if (t_render)
|
||||
{
|
||||
if (g_state.jitRender && g_state.ds->stopWaitFrame)
|
||||
@ -1563,21 +1580,6 @@ static void lg_shutdown(void)
|
||||
e_startup = NULL;
|
||||
}
|
||||
|
||||
// if spice is still connected send key up events for any pressed keys
|
||||
if (g_params.useSpiceInput)
|
||||
{
|
||||
for(int scancode = 0; scancode < KEY_MAX; ++scancode)
|
||||
if (g_state.keyDown[scancode])
|
||||
{
|
||||
g_state.keyDown[scancode] = false;
|
||||
purespice_keyUp(scancode);
|
||||
}
|
||||
|
||||
purespice_disconnect();
|
||||
if (t_spice)
|
||||
lgJoinThread(t_spice, NULL);
|
||||
}
|
||||
|
||||
if (g_state.ds)
|
||||
g_state.ds->shutdown();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user