#pragma once #include #include #include #include #include #include class EmuThread : public QThread { Q_OBJECT std::shared_ptr instance; std::shared_ptr wsiPlatform; std::shared_ptr windowInfo; public: explicit EmuThread(const std::shared_ptr &instance, const std::shared_ptr &wsiPlatform, const std::shared_ptr &windowInfo, SettingsWindow &) noexcept; [[noreturn]] void run() noexcept override; SDL_GameController *controller = nullptr; ParallelRDP parallel; n64::Core core; SettingsWindow &settings; void TogglePause() { core.pause = !core.pause; } void SetRender(bool v) { core.render = v; } void Reset() { core.pause = true; core.Stop(); core.LoadROM(core.rom); core.pause = false; } void Stop() { core.rom = {}; core.pause = true; core.Stop(); } };