Pass thread exit code from app thread as process exit code.

This commit is contained in:
Branimir Karadžić 2015-06-09 22:24:49 -07:00
parent ef143a1bb6
commit b2bc9238d0
3 changed files with 6 additions and 5 deletions

View file

@ -320,7 +320,7 @@ namespace entry
initTranslateGamepadAxis(SDL_CONTROLLER_AXIS_TRIGGERRIGHT, GamepadAxis::RightZ);
}
void run(int _argc, char** _argv)
int run(int _argc, char** _argv)
{
m_mte.m_argc = _argc;
m_mte.m_argv = _argv;
@ -710,6 +710,8 @@ namespace entry
SDL_DestroyWindow(m_window[0]);
SDL_Quit();
return m_thread.getExitCode();
}
WindowHandle findHandle(uint32_t _windowId)
@ -896,8 +898,7 @@ namespace entry
int main(int _argc, char** _argv)
{
using namespace entry;
s_ctx.run(_argc, _argv);
return 0;
return s_ctx.run(_argc, _argv);
}
#endif // ENTRY_CONFIG_USE_SDL

View file

@ -499,7 +499,7 @@ namespace entry
s_xinput.shutdown();
return 0;
return thread.getExitCode();
}
LRESULT process(HWND _hwnd, UINT _id, WPARAM _wparam, LPARAM _lparam)

View file

@ -477,7 +477,7 @@ namespace entry
XUnmapWindow(m_display, m_window[0]);
XDestroyWindow(m_display, m_window[0]);
return EXIT_SUCCESS;
return m_thread.getExitCode();
}
void setModifier(Modifier::Enum _modifier, bool _set)