From bbd8d6d5ac7b67783753dc3b6fdaf9bc887e52f2 Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Fri, 11 Nov 2022 08:33:44 +0100 Subject: [PATCH] Linux OpenGL: Fix gamepad not updating (#474) --- src/gui/canvas/OpenGLCanvas.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gui/canvas/OpenGLCanvas.cpp b/src/gui/canvas/OpenGLCanvas.cpp index 23d575fd..33beccf4 100644 --- a/src/gui/canvas/OpenGLCanvas.cpp +++ b/src/gui/canvas/OpenGLCanvas.cpp @@ -90,7 +90,15 @@ bool GLCanvas_MakeCurrent(bool padView) void GLCanvas_SwapBuffers(bool swapTV, bool swapDRC) { if (swapTV && sGLTVView) + { + GLCanvas_MakeCurrent(false); sGLTVView->SwapBuffers(); + } if (swapDRC && sGLPadView) + { + GLCanvas_MakeCurrent(true); sGLPadView->SwapBuffers(); -} \ No newline at end of file + } + + GLCanvas_MakeCurrent(false); +}