shutdown based on platform, update accessors for editors

This commit is contained in:
scawful
2024-07-31 11:28:09 -04:00
parent b08eb303ca
commit 49fbdd4c41
4 changed files with 16 additions and 4 deletions

View File

@@ -358,8 +358,19 @@ void Controller::OnExit() {
SDL_CloseAudioDevice(audio_device_);
delete audio_buffer_;
}
ImGui_ImplSDLRenderer2_Shutdown();
ImGui_ImplSDL2_Shutdown();
switch (platform_) {
case Platform::kMacOS:
case Platform::kWindows:
case Platform::kLinux:
ImGui_ImplSDLRenderer2_Shutdown();
ImGui_ImplSDL2_Shutdown();
break;
case Platform::kiOS:
// Deferred
break;
default:
break;
}
ImGui::DestroyContext();
SDL_Quit();
}