mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-26 16:46:28 +00:00
[host] dont overwrite the exit code on shutdown
This commit is contained in:
parent
ad9e84eaaa
commit
e926bad759
@ -32,6 +32,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
|||||||
|
|
||||||
int app_main(int argc, char * argv[]);
|
int app_main(int argc, char * argv[]);
|
||||||
bool app_init();
|
bool app_init();
|
||||||
|
void app_shutdown();
|
||||||
void app_quit();
|
void app_quit();
|
||||||
|
|
||||||
// these must be implemented for each OS
|
// these must be implemented for each OS
|
||||||
|
@ -304,11 +304,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||||||
|
|
||||||
shutdown:
|
shutdown:
|
||||||
DestroyMenu(app.trayMenu);
|
DestroyMenu(app.trayMenu);
|
||||||
app_quit();
|
app_shutdown();
|
||||||
if (!lgJoinThread(thread, &result))
|
if (!lgJoinThread(thread, &result))
|
||||||
{
|
{
|
||||||
DEBUG_ERROR("Failed to join the main application thread");
|
DEBUG_ERROR("Failed to join the main application thread");
|
||||||
result = -1;
|
result = LG_HOST_EXIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
|
@ -663,8 +663,13 @@ fail_ivshmem:
|
|||||||
return exitcode;
|
return exitcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void app_shutdown(void)
|
||||||
|
{
|
||||||
|
app.state = APP_STATE_SHUTDOWN;
|
||||||
|
}
|
||||||
|
|
||||||
void app_quit(void)
|
void app_quit(void)
|
||||||
{
|
{
|
||||||
app.exitcode = LG_HOST_EXIT_USER;
|
app.exitcode = LG_HOST_EXIT_USER;
|
||||||
app.state = APP_STATE_SHUTDOWN;
|
app_shutdown();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user