mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Pass thread exit code from app thread as process exit code. Issue #430.
This commit is contained in:
parent
ef143a1bb6
commit
6e6e16e2ba
3 changed files with 6 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -499,7 +499,7 @@ namespace entry
|
|||
|
||||
s_xinput.shutdown();
|
||||
|
||||
return 0;
|
||||
return thread.getExitCode();
|
||||
}
|
||||
|
||||
LRESULT process(HWND _hwnd, UINT _id, WPARAM _wparam, LPARAM _lparam)
|
||||
|
|
|
@ -477,7 +477,7 @@ namespace entry
|
|||
XUnmapWindow(m_display, m_window[0]);
|
||||
XDestroyWindow(m_display, m_window[0]);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
return thread.getExitCode();
|
||||
}
|
||||
|
||||
void setModifier(Modifier::Enum _modifier, bool _set)
|
||||
|
|
Loading…
Reference in a new issue