fix more bugs

This commit is contained in:
Arisotura 2019-05-24 02:35:25 +02:00
parent 0bb3321262
commit 9e2f47f4a0
3 changed files with 4 additions and 3 deletions

View File

@ -624,6 +624,7 @@ int InitRenderer(bool hasGL)
if (renderer == 0) SoftRenderer::Init();
Renderer = renderer;
UpdateRendererConfig();
GPU::SetDisplaySettings(Renderer != 0);
return renderer;
}

View File

@ -955,7 +955,7 @@ u32* GetLine(int line)
}
void SetupAccelFrame()
{printf("morp %04X\n", glGetError());
{
glBindTexture(GL_TEXTURE_2D, FramebufferTex[FrontBuffer]);
}

View File

@ -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};