@@ -14,6 +14,7 @@ CConsoleMinecraftApp app;
|
|||||||
|
|
||||||
CConsoleMinecraftApp::CConsoleMinecraftApp() : CMinecraftApp()
|
CConsoleMinecraftApp::CConsoleMinecraftApp() : CMinecraftApp()
|
||||||
{
|
{
|
||||||
|
m_bShutdown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CConsoleMinecraftApp::SetRichPresenceContext(int iPad, int contextId)
|
void CConsoleMinecraftApp::SetRichPresenceContext(int iPad, int contextId)
|
||||||
@@ -26,8 +27,7 @@ void CConsoleMinecraftApp::StoreLaunchData()
|
|||||||
}
|
}
|
||||||
void CConsoleMinecraftApp::ExitGame()
|
void CConsoleMinecraftApp::ExitGame()
|
||||||
{
|
{
|
||||||
// This is likely not the correct way to exit the game, but it will do for now
|
m_bShutdown = true;
|
||||||
ExitProcess(0);
|
|
||||||
}
|
}
|
||||||
void CConsoleMinecraftApp::FatalLoadError()
|
void CConsoleMinecraftApp::FatalLoadError()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ public:
|
|||||||
|
|
||||||
// original code
|
// original code
|
||||||
virtual void TemporaryCreateGameStart();
|
virtual void TemporaryCreateGameStart();
|
||||||
|
|
||||||
|
bool m_bShutdown;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CConsoleMinecraftApp app;
|
extern CConsoleMinecraftApp app;
|
||||||
|
|||||||
@@ -1034,7 +1034,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
MSG msg = {0};
|
MSG msg = {0};
|
||||||
while( WM_QUIT != msg.message )
|
while( WM_QUIT != msg.message && !app.m_bShutdown)
|
||||||
{
|
{
|
||||||
if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
|
if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user