diff options
author | Arisotura <thetotalworm@gmail.com> | 2019-05-24 02:35:25 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2019-05-24 02:35:25 +0200 |
commit | 9e2f47f4a0862e05f05cebbc5fae4e322c5b5d9f (patch) | |
tree | f4ae4eb9c5e2ec48ce39161cb7d180808b2ae532 | |
parent | 0bb3321262fcdff4edc3636e7301db70e5ff0533 (diff) |
fix more bugs
-rw-r--r-- | src/GPU3D.cpp | 1 | ||||
-rw-r--r-- | src/GPU3D_OpenGL.cpp | 2 | ||||
-rw-r--r-- | src/libui_sdl/main.cpp | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp index 770c874..98aa6eb 100644 --- a/src/GPU3D.cpp +++ b/src/GPU3D.cpp @@ -624,6 +624,7 @@ int InitRenderer(bool hasGL) if (renderer == 0) SoftRenderer::Init(); Renderer = renderer; + UpdateRendererConfig(); GPU::SetDisplaySettings(Renderer != 0); return renderer; } diff --git a/src/GPU3D_OpenGL.cpp b/src/GPU3D_OpenGL.cpp index cbf5abd..ceefbaf 100644 --- a/src/GPU3D_OpenGL.cpp +++ b/src/GPU3D_OpenGL.cpp @@ -955,7 +955,7 @@ u32* GetLine(int line) } void SetupAccelFrame() -{printf("morp %04X\n", glGetError()); +{ glBindTexture(GL_TEXTURE_2D, FramebufferTex[FrontBuffer]); } diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index e17827d..c302b7e 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -375,7 +375,7 @@ void GLScreen_DrawScreen() glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, GL_ScreenTexture); - if (GPU::Framebuffer[frontbuf][1]) + if (GPU::Framebuffer[frontbuf][0] && GPU::Framebuffer[frontbuf][1]) { if (GPU3D::Renderer == 0) { @@ -922,7 +922,7 @@ void OnAreaDraw(uiAreaHandler* handler, uiArea* area, uiAreaDrawParams* params) int frontbuf = GPU::FrontBuffer; if (!ScreenBitmap[0] || !ScreenBitmap[1]) return; - if (!GPU::Framebuffer[frontbuf][1]) return; + if (!GPU::Framebuffer[frontbuf][0] || !GPU::Framebuffer[frontbuf][1]) return; uiRect top = {0, 0, 256, 192}; uiRect bot = {0, 0, 256, 192}; |