From 536df254e0679c366abc63b87b910f0b41d264a5 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 21 Jan 2021 15:44:19 +1100 Subject: [PATCH] [host] fix the return code for the platform specific init --- host/platform/Windows/src/platform.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/host/platform/Windows/src/platform.c b/host/platform/Windows/src/platform.c index a4eb094f..ddaa6a49 100644 --- a/host/platform/Windows/src/platform.c +++ b/host/platform/Windows/src/platform.c @@ -182,7 +182,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine GetModuleFileName(NULL, app.executable, sizeof(app.executable)); if (HandleService(app.argc, app.argv)) - return 0; + return LG_HOST_EXIT_FAILED; /* this is a bit of a hack but without this --help will produce no output in a windows command prompt */ if (!IsDebuggerPresent() && AttachConsole(ATTACH_PARENT_PROCESS)) @@ -252,7 +252,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine if (!(class = RegisterClassEx(&wx))) { DEBUG_ERROR("Failed to register message window class"); - result = -1; + result = LG_HOST_EXIT_FAILED; goto finish; } @@ -278,7 +278,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine if (!lgCreateThread("appThread", appThread, NULL, &thread)) { DEBUG_ERROR("Failed to create the main application thread"); - result = -1; + result = LG_HOST_EXIT_FAILED; goto finish; } @@ -295,7 +295,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine else if (bRet < 0) { DEBUG_ERROR("Unknown error from GetMessage"); - result = -1; + result = LG_HOST_EXIT_FAILED; goto shutdown; }