diff options
Diffstat (limited to 'src/emu/emuopts.h')
-rw-r--r-- | src/emu/emuopts.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index e471edfe95a..0bbeb6ae3d7 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -266,9 +266,9 @@ public: int frameskip() const { return int_value(OPTION_FRAMESKIP); } int seconds_to_run() const { return int_value(OPTION_SECONDS_TO_RUN); } bool throttle() const { return bool_value(OPTION_THROTTLE); } - bool sleep() const { return bool_value(OPTION_SLEEP); } + bool sleep() const { return m_sleep; } float speed() const { return float_value(OPTION_SPEED); } - bool refresh_speed() const { return bool_value(OPTION_REFRESHSPEED); } + bool refresh_speed() const { return m_refresh_speed; } // core rotation options bool rotate() const { return bool_value(OPTION_ROTATE); } @@ -327,8 +327,8 @@ public: bool ui_active() const { return bool_value(OPTION_UI_ACTIVE); } bool offscreen_reload() const { return bool_value(OPTION_OFFSCREEN_RELOAD); } bool natural_keyboard() const { return bool_value(OPTION_NATURAL_KEYBOARD); } - bool joystick_contradictory() const { return bool_value(OPTION_JOYSTICK_CONTRADICTORY); } - int coin_impulse() const { return int_value(OPTION_COIN_IMPULSE); } + bool joystick_contradictory() const { return m_joystick_contradictory; } + int coin_impulse() const { return m_coin_impulse; } // core debugging options bool log() const { return bool_value(OPTION_LOG); } @@ -382,7 +382,16 @@ private: // INI parsing helper bool parse_one_ini(const char *basename, int priority, std::string *error_string = NULL); + // cache frequently used options in members + void update_cached_options(); + static const options_entry s_option_entries[]; + + // cached options + int m_coin_impulse; + bool m_joystick_contradictory; + bool m_sleep; + bool m_refresh_speed; }; |