Fixing minor bugs, added about screen
This commit is contained in:
1 parent
159fac02f0
commit
b6cd17449f
11 files changed
+257
-22
No files matched your search
@@ -356,8 +356,10 @@ int main(int argc, char* argv[]) {
|
||||
#endif
|
||||
}
|
||||
|
||||
//ZL::logger() << "Quitting step 1: " << std::endl;
|
||||
// Явное уничтожение объекта игры ДО завершения работы Steamworks
|
||||
delete g_game;
|
||||
//ZL::logger() << "Quitting step 2: " << std::endl;
|
||||
g_game = nullptr;
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
@@ -377,19 +379,31 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
//ZL::logger() << "Quitting step 3: " << std::endl;
|
||||
|
||||
#ifdef STEAMSDK
|
||||
// Деинициализация Steamworks происходит только тогда, когда все объекты игры гарантированно уничтожены
|
||||
SteamAPI_Shutdown();
|
||||
#endif
|
||||
//ZL::logger() << "Quitting step 4: " << std::endl;
|
||||
|
||||
// Очистка ресурсов SDL
|
||||
if (ctx) {
|
||||
//ZL::logger() << "Quitting step 5: " << std::endl;
|
||||
SDL_GL_DeleteContext(ctx);
|
||||
}
|
||||
//ZL::logger() << "Quitting step 6: " << std::endl;
|
||||
if (ZL::Environment::window) {
|
||||
//ZL::logger() << "Quitting step 7: " << std::endl;
|
||||
SDL_DestroyWindow(ZL::Environment::window);
|
||||
}
|
||||
//ZL::logger() << "Quitting step 8: " << std::endl;
|
||||
#ifndef EMSCRIPTEN
|
||||
// In Emscripten, SDL must stay alive across context loss/restore cycles
|
||||
// so the window remains valid when the game object is re-created.
|
||||
SDL_Quit();
|
||||
#endif
|
||||
//ZL::logger() << "Quitting step 9: " << std::endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user