fix: Update Window Event Handling and Emulator Destructor Logic

- Added handling for SDL_WINDOWEVENT_RESIZED, SDL_WINDOWEVENT_MINIMIZED, SDL_WINDOWEVENT_HIDDEN, SDL_WINDOWEVENT_RESTORED, and SDL_WINDOWEVENT_SHOWN in the window event processing to improve rendering behavior during window state changes.
- Modified the Emulator destructor to stop emulation without calling Cleanup(), as the renderer is already destroyed, ensuring proper shutdown behavior.
This commit is contained in:
scawful
2025-10-07 18:21:12 -04:00
parent defc99b571
commit 2edeb9f50d
2 changed files with 13 additions and 1 deletions

View File

@@ -50,7 +50,9 @@ using ImGui::TableNextColumn;
using ImGui::Text;
Emulator::~Emulator() {
Cleanup();
// Don't call Cleanup() in destructor - renderer is already destroyed
// Just stop emulation
running_ = false;
}
void Emulator::Cleanup() {