aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2019-06-02 15:22:37 +0200
committerArisotura <thetotalworm@gmail.com>2019-06-02 15:22:37 +0200
commit5487a4e71cf03c15637bcb3d02a39ba64a66f149 (patch)
treec035caa1997e59c6ea9c82a55c3e27160e4a9371 /src/libui_sdl
parent6de19645f8fdd309cdf9f53d846b70f45ed66e62 (diff)
fix bugs when changing 3D renderer with no game loaded
Diffstat (limited to 'src/libui_sdl')
-rw-r--r--src/libui_sdl/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp
index fe1b745..73666cd 100644
--- a/src/libui_sdl/main.cpp
+++ b/src/libui_sdl/main.cpp
@@ -709,7 +709,6 @@ int EmuThreadFunc(void* burp)
else
{
GPU3D::InitRenderer(false);
- GPU::SetDisplaySettings(false);
}
Touching = false;
@@ -1389,6 +1388,14 @@ void OnAreaResize(uiAreaHandler* handler, uiArea* area, int width, int height)
void Run()
{
+ if (GPU3D::Renderer != Config::_3DRenderer)
+ {
+ if (Screen_UseGL) uiGLMakeContextCurrent(GLContext);
+ GPU3D::DeInitRenderer();
+ GPU3D::InitRenderer(Screen_UseGL);
+ if (Screen_UseGL) uiGLMakeContextCurrent(NULL);
+ }
+
EmuRunning = 1;
RunningSomething = true;