start work on multiple window support

This commit is contained in:
Arisotura
2024-02-20 12:30:19 +01:00
parent a8429af131
commit 5c93ab4271
10 changed files with 165 additions and 33 deletions

View File

@ -25,6 +25,7 @@
#include <atomic>
#include <variant>
#include <optional>
#include <list>
#include "NDSCart.h"
#include "GBACart.h"
@ -37,6 +38,7 @@ namespace melonDS
class NDS;
}
class MainWindow;
class ScreenPanelGL;
class EmuThread : public QThread
@ -47,6 +49,9 @@ class EmuThread : public QThread
public:
explicit EmuThread(QObject* parent = nullptr);
void attachWindow(MainWindow* window);
void detachWindow(MainWindow* window);
void changeWindowTitle(char* title);
// to be called from the UI thread
@ -123,10 +128,13 @@ private:
};
std::atomic<ContextRequestKind> ContextRequest = contextRequest_None;
ScreenPanelGL* screenGL;
//ScreenPanelGL* screenGL;
MainWindow* mainWindow;
std::list<MainWindow*> windowList;
int autoScreenSizing;
bool useOpenGL;
int videoRenderer;
bool videoSettingsDirty;
};