| 326 | static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f); |
| 327 | |
| 328 | void uiShutdown() { |
| 329 | int x=0, y=0; |
| 330 | SDL_GetWindowPosition(window, &x, &y); |
| 331 | GlobalSettings::saveScreenSize(x, y, (int)ImGui::GetIO().DisplaySize.x, (int)ImGui::GetIO().DisplaySize.y); |
| 332 | GlobalSettings::saveConfig(); |
| 333 | BaseDlg::stopAllDialogs(); |
| 334 | |
| 335 | // Cleanup |
| 336 | #ifdef BOXEDWINE_IMGUI_DX9 |
| 337 | if (StartUpArgs::uiType == UI_TYPE_DX9) { |
| 338 | ImGui_ImplDX9_Shutdown(); |
| 339 | CleanupDeviceD3D(); |
| 340 | } |
| 341 | #elif defined(BOXEDWINE_OPENGL_SDL) |
| 342 | if (StartUpArgs::uiType == UI_TYPE_OPENGL) { |
| 343 | #if defined(BOXEDWINE_OPENGL_IMGUI_V2) |
| 344 | ImGui_ImplOpenGL2_Shutdown(); |
| 345 | #else |
| 346 | ImGui_ImplOpenGL3_Shutdown(); |
| 347 | #endif |
| 348 | SDL_GL_DeleteContext(gl_context); |
| 349 | } |
| 350 | #endif |
| 351 | BoxedTexture::resetAll(); |
| 352 | ImGui_ImplSDL2_Shutdown(); |
| 353 | ImGui::DestroyContext(); |
| 354 | |
| 355 | SDL_DestroyWindow(window); |
| 356 | window = nullptr; |
| 357 | } |
| 358 | |
| 359 | void uiPumpEvents() { |
| 360 | SDL_PumpEvents(); |
no test coverage detected