fix possible crash
This commit is contained in:
parent
956c2c5d86
commit
9ed1dda9ca
|
@ -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,8 +254,6 @@ void AssignFramebuffers()
|
|||
|
||||
void SetDisplaySettings(bool accel)
|
||||
{
|
||||
if (accel != Accelerated)
|
||||
{
|
||||
int fbsize;
|
||||
if (accel) fbsize = (256*3 + 1) * 192;
|
||||
else fbsize = 256 * 192;
|
||||
|
@ -274,7 +272,6 @@ void SetDisplaySettings(bool accel)
|
|||
memset(Framebuffer[1][1], 0, fbsize*4);
|
||||
|
||||
AssignFramebuffers();
|
||||
}
|
||||
|
||||
GPU2D_A->SetDisplaySettings(accel);
|
||||
GPU2D_B->SetDisplaySettings(accel);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue