diff options
Diffstat (limited to 'src/frontend/qt_sdl/main.h')
-rw-r--r-- | src/frontend/qt_sdl/main.h | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/src/frontend/qt_sdl/main.h b/src/frontend/qt_sdl/main.h index 8a902ee..44283a9 100644 --- a/src/frontend/qt_sdl/main.h +++ b/src/frontend/qt_sdl/main.h @@ -94,12 +94,29 @@ private: void initOpenGL(); void deinitOpenGL(); - std::atomic<int> EmuStatus; - int PrevEmuStatus; - int EmuRunning; - int EmuPause; - - std::atomic<int> ContextRequest = 0; + enum EmuStatusKind + { + emuStatus_Exit, + emuStatus_Running, + emuStatus_Paused, + emuStatus_FrameStep, + }; + std::atomic<EmuStatusKind> EmuStatus; + + EmuStatusKind PrevEmuStatus; + EmuStatusKind EmuRunning; + + constexpr static int EmuPauseStackRunning = 0; + constexpr static int EmuPauseStackPauseThreshold = 1; + int EmuPauseStack; + + enum ContextRequestKind + { + contextRequest_None = 0, + contextRequest_InitGL, + contextRequest_DeInitGL + }; + std::atomic<ContextRequestKind> ContextRequest = contextRequest_None; GL::Context* oglContext = nullptr; GLuint screenVertexBuffer, screenVertexArray; @@ -404,14 +421,14 @@ public: QAction* actSavestateSRAMReloc; QAction* actScreenSize[4]; QActionGroup* grpScreenRotation; - QAction* actScreenRotation[4]; + QAction* actScreenRotation[Frontend::screenRot_MAX]; QActionGroup* grpScreenGap; QAction* actScreenGap[6]; QActionGroup* grpScreenLayout; - QAction* actScreenLayout[4]; + QAction* actScreenLayout[Frontend::screenLayout_MAX]; QAction* actScreenSwap; QActionGroup* grpScreenSizing; - QAction* actScreenSizing[6]; + QAction* actScreenSizing[Frontend::screenSizing_MAX]; QAction* actIntegerScaling; QActionGroup* grpScreenAspectTop; QAction** actScreenAspectTop; |