diff options
author | Vas Crabb <cuavas@users.noreply.github.com> | 2016-05-30 22:43:53 +1000 |
---|---|---|
committer | Vas Crabb <cuavas@users.noreply.github.com> | 2016-05-30 22:43:53 +1000 |
commit | 7dd07bdfae24c988900a9cd1de20f0adab7d0737 (patch) | |
tree | 9f2b45dec56a576ae81be48f49572f92a8787cb5 /src/emu | |
parent | 8a96c7fef8622582fdc57d41a2b43dc1a45020b5 (diff) | |
parent | d134d16d7deea9f8066d0714bec4e62c4ef7fe33 (diff) |
Merge pull request #912 from npwoods/ui_option_as_enum
Changed the backing representation of OPTION_UI from being a string t…
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/emuopts.cpp | 7 | ||||
-rw-r--r-- | src/emu/emuopts.h | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 85bf2c0415e..1b99a55e1ba 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -219,6 +219,7 @@ emu_options::emu_options() , m_joystick_contradictory(false) , m_sleep(true) , m_refresh_speed(false) +, m_ui(UI_CABINET) { add_entries(emu_options::s_option_entries); } @@ -263,4 +264,10 @@ void emu_options::update_cached_options() m_joystick_contradictory = bool_value(OPTION_JOYSTICK_CONTRADICTORY); m_sleep = bool_value(OPTION_SLEEP); m_refresh_speed = bool_value(OPTION_REFRESHSPEED); + + auto ui_option_string = value(OPTION_UI); + if (!strcmp(ui_option_string, "simple")) + m_ui = UI_SIMPLE; + else + m_ui = UI_CABINET; } diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index d4d4731997c..2b6630d38dd 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -194,6 +194,12 @@ class emu_options : public core_options { public: + enum ui_option + { + UI_CABINET, + UI_SIMPLE + }; + // construction/destruction emu_options(); @@ -343,7 +349,7 @@ public: bool cheat() const { return bool_value(OPTION_CHEAT); } bool skip_gameinfo() const { return bool_value(OPTION_SKIP_GAMEINFO); } const char *ui_font() const { return value(OPTION_UI_FONT); } - const char *ui() const { return value(OPTION_UI); } + ui_option ui() const { return m_ui; } const char *ram_size() const { return value(OPTION_RAMSIZE); } // core comm options @@ -382,6 +388,7 @@ private: bool m_joystick_contradictory; bool m_sleep; bool m_refresh_speed; + ui_option m_ui; }; |