mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
fix more stupid shit. askzjkdsf
This commit is contained in:
@ -987,6 +987,9 @@ void RenderFrame()
|
||||
{
|
||||
CurShaderID = -1;
|
||||
|
||||
if (Antialias) glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[2]);
|
||||
else glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[FrontBuffer]);
|
||||
|
||||
ShaderConfig.uScreenSize[0] = ScreenW;
|
||||
ShaderConfig.uScreenSize[1] = ScreenH;
|
||||
ShaderConfig.uDispCnt = RenderDispCnt;
|
||||
@ -1080,9 +1083,6 @@ void RenderFrame()
|
||||
|
||||
glViewport(0, 0, ScreenW, ScreenH);
|
||||
|
||||
if (Antialias) glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[2]);
|
||||
else glBindFramebuffer(GL_FRAMEBUFFER, FramebufferID[FrontBuffer]);
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
glColorMaski(0, GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
glColorMaski(1, GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
|
@ -289,6 +289,8 @@ void GLScreen_DrawScreen()
|
||||
{
|
||||
float scale = uiGLGetFramebufferScale(GLContext);
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, uiGLGetFramebuffer(GLContext));
|
||||
|
||||
if (GL_ScreenSizeDirty)
|
||||
{
|
||||
GL_ScreenSizeDirty = false;
|
||||
@ -424,8 +426,6 @@ void GLScreen_DrawScreen()
|
||||
else
|
||||
OpenGL_UseShaderProgram(GL_ScreenShaderAccel);
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, uiGLGetFramebuffer(GLContext));
|
||||
|
||||
glClearColor(0, 0, 0, 1);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
@ -2150,29 +2150,20 @@ void ApplyNewSettings(int type)
|
||||
{
|
||||
bool usegl = Config::ScreenUseGL || (Config::_3DRenderer != 0);
|
||||
if (usegl != Screen_UseGL)
|
||||
{
|
||||
if (RunningSomething)
|
||||
{
|
||||
if (Screen_UseGL) uiGLMakeContextCurrent(GLContext);
|
||||
GPU3D::DeInitRenderer();
|
||||
if (Screen_UseGL) uiGLMakeContextCurrent(NULL);
|
||||
}
|
||||
|
||||
if (Screen_UseGL) uiGLMakeContextCurrent(GLContext);
|
||||
OSD::DeInit(Screen_UseGL);
|
||||
if (Screen_UseGL) uiGLMakeContextCurrent(NULL);
|
||||
|
||||
Screen_UseGL = usegl;
|
||||
RecreateMainWindow(usegl);
|
||||
|
||||
if (RunningSomething)
|
||||
{
|
||||
if (Screen_UseGL) uiGLMakeContextCurrent(GLContext);
|
||||
GPU3D::InitRenderer(Screen_UseGL);
|
||||
if (Screen_UseGL) uiGLMakeContextCurrent(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (type == 3) // 3D renderer
|
||||
{
|
||||
if (Screen_UseGL) uiGLMakeContextCurrent(GLContext);
|
||||
|
Reference in New Issue
Block a user