From 9c8f229fed59e0b2f9035d185742c3ab04b921f7 Mon Sep 17 00:00:00 2001 From: Arisotura Date: Thu, 31 Oct 2024 22:37:46 +0100 Subject: [PATCH] misc shit --- src/frontend/qt_sdl/AudioSettingsDialog.cpp | 2 +- src/frontend/qt_sdl/EmuThread.cpp | 8 ++++---- src/frontend/qt_sdl/EmuThread.h | 4 ++-- src/frontend/qt_sdl/Screen.cpp | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/frontend/qt_sdl/AudioSettingsDialog.cpp b/src/frontend/qt_sdl/AudioSettingsDialog.cpp index 5c0c9330..5f2aef19 100644 --- a/src/frontend/qt_sdl/AudioSettingsDialog.cpp +++ b/src/frontend/qt_sdl/AudioSettingsDialog.cpp @@ -41,7 +41,7 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget* parent) : QDialog(parent), ui( emuInstance = ((MainWindow*)parent)->getEmuInstance(); auto& cfg = emuInstance->getGlobalConfig(); auto& instcfg = emuInstance->getLocalConfig(); - bool emuActive = emuInstance->getEmuThread()->emuIsActive(); + bool emuActive = emuInstance->emuIsActive(); oldInterp = cfg.GetInt("Audio.Interpolation"); oldBitDepth = cfg.GetInt("Audio.BitDepth"); diff --git a/src/frontend/qt_sdl/EmuThread.cpp b/src/frontend/qt_sdl/EmuThread.cpp index f0207f1a..7e1b040c 100644 --- a/src/frontend/qt_sdl/EmuThread.cpp +++ b/src/frontend/qt_sdl/EmuThread.cpp @@ -319,13 +319,13 @@ void EmuThread::run() if (!useOpenGL) { - FrontBufferLock.lock(); - FrontBuffer = emuInstance->nds->GPU.FrontBuffer; - FrontBufferLock.unlock(); + frontBufferLock.lock(); + frontBuffer = emuInstance->nds->GPU.FrontBuffer; + frontBufferLock.unlock(); } else { - FrontBuffer = emuInstance->nds->GPU.FrontBuffer; + frontBuffer = emuInstance->nds->GPU.FrontBuffer; emuInstance->drawScreenGL(); } diff --git a/src/frontend/qt_sdl/EmuThread.h b/src/frontend/qt_sdl/EmuThread.h index 18bff6dd..f28c0604 100644 --- a/src/frontend/qt_sdl/EmuThread.h +++ b/src/frontend/qt_sdl/EmuThread.h @@ -136,8 +136,8 @@ public: void updateVideoSettings() { videoSettingsDirty = true; } void updateVideoRenderer() { videoSettingsDirty = true; lastVideoRenderer = -1; } - int FrontBuffer = 0; - QMutex FrontBufferLock; + int frontBuffer = 0; + QMutex frontBufferLock; signals: void windowUpdate(); diff --git a/src/frontend/qt_sdl/Screen.cpp b/src/frontend/qt_sdl/Screen.cpp index eab5feee..3eb37183 100644 --- a/src/frontend/qt_sdl/Screen.cpp +++ b/src/frontend/qt_sdl/Screen.cpp @@ -782,17 +782,17 @@ void ScreenPanelNative::paintEvent(QPaintEvent* event) auto nds = emuInstance->getNDS(); assert(nds != nullptr); - emuThread->FrontBufferLock.lock(); - int frontbuf = emuThread->FrontBuffer; + emuThread->frontBufferLock.lock(); + int frontbuf = emuThread->frontBuffer; if (!nds->GPU.Framebuffer[frontbuf][0] || !nds->GPU.Framebuffer[frontbuf][1]) { - emuThread->FrontBufferLock.unlock(); + emuThread->frontBufferLock.unlock(); return; } memcpy(screen[0].scanLine(0), nds->GPU.Framebuffer[frontbuf][0].get(), 256 * 192 * 4); memcpy(screen[1].scanLine(0), nds->GPU.Framebuffer[frontbuf][1].get(), 256 * 192 * 4); - emuThread->FrontBufferLock.unlock(); + emuThread->frontBufferLock.unlock(); QRect screenrc(0, 0, 256, 192); @@ -1106,7 +1106,7 @@ void ScreenPanelGL::drawScreenGL() glUseProgram(screenShaderProgram); glUniform2f(screenShaderScreenSizeULoc, w / factor, h / factor); - int frontbuf = emuThread->FrontBuffer; + int frontbuf = emuThread->frontBuffer; glActiveTexture(GL_TEXTURE0); #ifdef OGLRENDERER_ENABLED