diff --git a/Source/Core/DolphinWX/MainAndroid.cpp b/Source/Core/DolphinWX/MainAndroid.cpp index 1612c0ba92..0d1f4e6882 100644 --- a/Source/Core/DolphinWX/MainAndroid.cpp +++ b/Source/Core/DolphinWX/MainAndroid.cpp @@ -609,8 +609,8 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_Run(JNIEnv * } // Install our callbacks - OSD::AddCallback(OSD::OSD_INIT, ButtonManager::Init); - OSD::AddCallback(OSD::OSD_SHUTDOWN, ButtonManager::Shutdown); + OSD::AddCallback(OSD::CallbackType::Initialization, ButtonManager::Init); + OSD::AddCallback(OSD::CallbackType::Shutdown, ButtonManager::Shutdown); RegisterMsgAlertHandler(&MsgAlert); diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index a311420477..7b3895d5aa 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -1520,7 +1520,7 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, co DrawDebugText(); // Do our OSD callbacks - OSD::DoCallbacks(OSD::OSD_ONFRAME); + OSD::DoCallbacks(OSD::CallbackType::OnFrame); OSD::DrawMessages(); // Copy the rendered frame to the real window diff --git a/Source/Core/VideoBackends/OGL/main.cpp b/Source/Core/VideoBackends/OGL/main.cpp index 2e14a3643a..eb388b9eea 100644 --- a/Source/Core/VideoBackends/OGL/main.cpp +++ b/Source/Core/VideoBackends/OGL/main.cpp @@ -165,7 +165,7 @@ bool VideoBackend::Initialize(void *window_handle) return false; // Do our OSD callbacks - OSD::DoCallbacks(OSD::OSD_INIT); + OSD::DoCallbacks(OSD::CallbackType::Initialization); s_BackendInitialized = true; @@ -209,7 +209,7 @@ void VideoBackend::Shutdown() s_BackendInitialized = false; // Do our OSD callbacks - OSD::DoCallbacks(OSD::OSD_SHUTDOWN); + OSD::DoCallbacks(OSD::CallbackType::Shutdown); GLInterface->Shutdown(); GLInterface.reset(); diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp index c30b34720f..3eeed2958b 100644 --- a/Source/Core/VideoBackends/Software/SWRenderer.cpp +++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp @@ -150,7 +150,7 @@ void SWRenderer::Swap(u32 fbWidth, u32 fbHeight) s_bScreenshot.store(false); } - OSD::DoCallbacks(OSD::OSD_ONFRAME); + OSD::DoCallbacks(OSD::CallbackType::OnFrame); DrawDebugText(); diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp index c891542d8a..ddab028435 100644 --- a/Source/Core/VideoBackends/Software/SWmain.cpp +++ b/Source/Core/VideoBackends/Software/SWmain.cpp @@ -150,7 +150,7 @@ void VideoSoftware::Shutdown() DebugUtil::Shutdown(); // Do our OSD callbacks - OSD::DoCallbacks(OSD::OSD_SHUTDOWN); + OSD::DoCallbacks(OSD::CallbackType::Shutdown); SWOGLWindow::Shutdown(); } @@ -163,7 +163,7 @@ void VideoSoftware::Video_Cleanup() void VideoSoftware::Video_Prepare() { // Do our OSD callbacks - OSD::DoCallbacks(OSD::OSD_INIT); + OSD::DoCallbacks(OSD::CallbackType::Initialization); SWRenderer::Prepare(); diff --git a/Source/Core/VideoCommon/OnScreenDisplay.cpp b/Source/Core/VideoCommon/OnScreenDisplay.cpp index dfd597f0ed..ebce4f79ea 100644 --- a/Source/Core/VideoCommon/OnScreenDisplay.cpp +++ b/Source/Core/VideoCommon/OnScreenDisplay.cpp @@ -83,7 +83,7 @@ void DoCallbacks(CallbackType type) } // Wipe all callbacks on shutdown - if (type == OSD_SHUTDOWN) + if (type == CallbackType::Shutdown) s_callbacks.clear(); } diff --git a/Source/Core/VideoCommon/OnScreenDisplay.h b/Source/Core/VideoCommon/OnScreenDisplay.h index 17a5494345..8bf6852061 100644 --- a/Source/Core/VideoCommon/OnScreenDisplay.h +++ b/Source/Core/VideoCommon/OnScreenDisplay.h @@ -17,13 +17,13 @@ void DrawMessages(); // draw the current messages on the screen. Only call once void ClearMessages(); // On-screen callbacks -enum CallbackType +enum class CallbackType { - OSD_INIT = 0, - OSD_ONFRAME, - OSD_SHUTDOWN + Initialization, + OnFrame, + Shutdown }; -typedef std::function Callback; +using Callback = std::function; void AddCallback(CallbackType type, Callback cb); void DoCallbacks(CallbackType type);