diff options
| author | Markus Wick <degasus@users.noreply.github.com> | 2016-01-04 13:47:22 +0100 |
|---|---|---|
| committer | Markus Wick <degasus@users.noreply.github.com> | 2016-01-04 13:47:22 +0100 |
| commit | ca7160f714350ccac9f5bc4625a43c9bdedebcb6 (patch) | |
| tree | 515a8765cec6c3eb5308118ea3bae524c44a0864 /Source/Core/VideoCommon | |
| parent | 3045e08daf5df064cf046d58ab6a77e987af2115 (diff) | |
| parent | edda018d543bf80cd70fa2c2952e2425c650f26e (diff) | |
Merge pull request #3434 from lioncash/enum
OnScreenDisplay: Make CallbackType an enum class
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/OnScreenDisplay.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/OnScreenDisplay.h | 10 |
2 files changed, 6 insertions, 6 deletions
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<void()> Callback; +using Callback = std::function<void()>; void AddCallback(CallbackType type, Callback cb); void DoCallbacks(CallbackType type); |
