mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
GL: don't draw the screens when nothing is running
This commit is contained in:
@ -396,6 +396,8 @@ void GLScreen_DrawScreen()
|
|||||||
glClearColor(0, 0, 0, 1);
|
glClearColor(0, 0, 0, 1);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
|
if (RunningSomething)
|
||||||
|
{
|
||||||
int frontbuf = GPU::FrontBuffer;
|
int frontbuf = GPU::FrontBuffer;
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
glBindTexture(GL_TEXTURE_2D, GL_ScreenTexture);
|
glBindTexture(GL_TEXTURE_2D, GL_ScreenTexture);
|
||||||
@ -425,6 +427,7 @@ void GLScreen_DrawScreen()
|
|||||||
glBindBuffer(GL_ARRAY_BUFFER, GL_ScreenVertexBufferID);
|
glBindBuffer(GL_ARRAY_BUFFER, GL_ScreenVertexBufferID);
|
||||||
glBindVertexArray(GL_ScreenVertexArrayID);
|
glBindVertexArray(GL_ScreenVertexArrayID);
|
||||||
glDrawArrays(GL_TRIANGLES, 0, 4*3);
|
glDrawArrays(GL_TRIANGLES, 0, 4*3);
|
||||||
|
}
|
||||||
|
|
||||||
glFlush();
|
glFlush();
|
||||||
uiGLSwapBuffers(GLContext);
|
uiGLSwapBuffers(GLContext);
|
||||||
|
Reference in New Issue
Block a user