mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 06:10:03 -06:00
remove global emuThread from Window.cpp
This commit is contained in:
@ -96,6 +96,7 @@ EmuThread::EmuThread(QObject* parent) : QThread(parent)
|
||||
void EmuThread::attachWindow(MainWindow* window)
|
||||
{
|
||||
windowList.push_back(window);
|
||||
window->attachEmuThread(this);
|
||||
mainWindow = windowList.front();
|
||||
|
||||
connect(this, SIGNAL(windowUpdate()), window->panel, SLOT(repaint()));
|
||||
@ -128,6 +129,7 @@ void EmuThread::detachWindow(MainWindow* window)
|
||||
disconnect(this, SIGNAL(screenEmphasisToggle()), window, SLOT(onScreenEmphasisToggled()));
|
||||
|
||||
windowList.remove(window);
|
||||
window->attachEmuThread(nullptr);
|
||||
mainWindow = windowList.front();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user