Properly join emulator thread

This commit is contained in:
wheremyfoodat 2023-10-01 23:51:08 +03:00
parent 84044d078e
commit 061c80fd11
3 changed files with 18 additions and 6 deletions

View file

@ -5,6 +5,7 @@
#include <QMenuBar>
#include <QPalette>
#include <QtWidgets>
#include <atomic>
#include <thread>
#include "emulator.hpp"
@ -24,9 +25,11 @@ class MainWindow : public QMainWindow {
Emulator* emu = nullptr;
std::thread emuThread;
std::atomic<bool> appRunning = true; // Is the application itself running?
ScreenWidget screen;
QComboBox* themeSelect = nullptr;
QMenuBar* menuBar = nullptr;
ScreenWidget screen;
Theme currentTheme;
void setTheme(Theme theme);