mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 05:17:40 -07:00
misc shit
This commit is contained in:
parent
f3bd58f75e
commit
9c8f229fed
@ -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");
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user