diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GPU.cpp | 41 | ||||
-rw-r--r-- | src/libui_sdl/main.cpp | 2 |
2 files changed, 20 insertions, 23 deletions
diff --git a/src/GPU.cpp b/src/GPU.cpp index fe23a77..d1870fd 100644 --- a/src/GPU.cpp +++ b/src/GPU.cpp @@ -150,7 +150,7 @@ void Reset() VRAMMap_ARM7[0] = 0; VRAMMap_ARM7[1] = 0; - +printf("RESET: ACCEL=%d FRAMEBUFFER=%p\n", Accelerated, Framebuffer[0][0]); int fbsize; if (Accelerated) fbsize = (256*3 + 1) * 192; else fbsize = 256 * 192; @@ -254,27 +254,24 @@ void AssignFramebuffers() void SetDisplaySettings(bool accel) { - if (accel != Accelerated) - { - int fbsize; - if (accel) fbsize = (256*3 + 1) * 192; - else fbsize = 256 * 192; - if (Framebuffer[0][0]) delete[] Framebuffer[0][0]; - if (Framebuffer[1][0]) delete[] Framebuffer[1][0]; - if (Framebuffer[0][1]) delete[] Framebuffer[0][1]; - if (Framebuffer[1][1]) delete[] Framebuffer[1][1]; - Framebuffer[0][0] = new u32[fbsize]; - Framebuffer[1][0] = new u32[fbsize]; - Framebuffer[0][1] = new u32[fbsize]; - Framebuffer[1][1] = new u32[fbsize]; - - memset(Framebuffer[0][0], 0, fbsize*4); - memset(Framebuffer[1][0], 0, fbsize*4); - memset(Framebuffer[0][1], 0, fbsize*4); - memset(Framebuffer[1][1], 0, fbsize*4); - - AssignFramebuffers(); - } + int fbsize; + if (accel) fbsize = (256*3 + 1) * 192; + else fbsize = 256 * 192; + if (Framebuffer[0][0]) delete[] Framebuffer[0][0]; + if (Framebuffer[1][0]) delete[] Framebuffer[1][0]; + if (Framebuffer[0][1]) delete[] Framebuffer[0][1]; + if (Framebuffer[1][1]) delete[] Framebuffer[1][1]; + Framebuffer[0][0] = new u32[fbsize]; + Framebuffer[1][0] = new u32[fbsize]; + Framebuffer[0][1] = new u32[fbsize]; + Framebuffer[1][1] = new u32[fbsize]; + + memset(Framebuffer[0][0], 0, fbsize*4); + memset(Framebuffer[1][0], 0, fbsize*4); + memset(Framebuffer[0][1], 0, fbsize*4); + memset(Framebuffer[1][1], 0, fbsize*4); + + AssignFramebuffers(); GPU2D_A->SetDisplaySettings(accel); GPU2D_B->SetDisplaySettings(accel); diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index f6ef397..874d8ff 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -384,7 +384,7 @@ void GLScreen_DrawScreen() OpenGL_UseShaderProgram(GL_ScreenShaderAccel); glBindFramebuffer(GL_FRAMEBUFFER, 0); - glClearColor(0, 1, 0, 1); + glClearColor(0, 0, 0, 1); glClear(GL_COLOR_BUFFER_BIT); int frontbuf = GPU::FrontBuffer; |