MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / uiShutdown

Function uiShutdown

source/ui/mainui.cpp:328–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
327
328void 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
359void uiPumpEvents() {
360 SDL_PumpEvents();

Callers 4

showWindowMethod · 0.85
uiContinueFunction · 0.85
startAppMethod · 0.85
showWindowMethod · 0.85

Calls 9

SDL_GetWindowPositionFunction · 0.85
ImGui_ImplDX9_ShutdownFunction · 0.85
SDL_GL_DeleteContextFunction · 0.85
ImGui_ImplSDL2_ShutdownFunction · 0.85
DestroyContextFunction · 0.85
SDL_DestroyWindowFunction · 0.85
CleanupDeviceD3DFunction · 0.70

Tested by

no test coverage detected