mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 04:49:14 +12:00
Use mutex for synchronizing the UI with the emulator thread
This commit is contained in:
parent
ab2ff18290
commit
6ae8d084b4
2 changed files with 41 additions and 14 deletions
|
@ -6,8 +6,9 @@
|
|||
#include <QPalette>
|
||||
#include <QtWidgets>
|
||||
#include <atomic>
|
||||
#include <thread>
|
||||
#include <filesystem>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
|
||||
#include "emulator.hpp"
|
||||
#include "panda_qt/screen.hpp"
|
||||
|
@ -27,9 +28,11 @@ class MainWindow : public QMainWindow {
|
|||
std::thread emuThread;
|
||||
|
||||
std::atomic<bool> appRunning = true; // Is the application itself running?
|
||||
std::atomic<bool> needToLoadROM = false;
|
||||
std::mutex messageQueueMutex; // Used for synchronizing messages between the emulator and UI
|
||||
std::filesystem::path romToLoad = "";
|
||||
|
||||
bool needToLoadROM = false;
|
||||
|
||||
ScreenWidget screen;
|
||||
QComboBox* themeSelect = nullptr;
|
||||
QMenuBar* menuBar = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue