summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/lib/osdobj_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/lib/osdobj_common.h')
-rw-r--r--src/osd/modules/lib/osdobj_common.h172
1 files changed, 86 insertions, 86 deletions
diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h
index 3ea631a4495..322bcadf682 100644
--- a/src/osd/modules/lib/osdobj_common.h
+++ b/src/osd/modules/lib/osdobj_common.h
@@ -62,47 +62,47 @@
class osd_options : public cli_options
{
public:
- // construction/destruction
- osd_options();
-
- // debugging options
- const char *debugger() const { return value(OSDOPTION_DEBUGGER); }
- int watchdog() const { return int_value(OSDOPTION_WATCHDOG); }
-
- // performance options
- bool multithreading() const { return bool_value(OSDOPTION_MULTITHREADING); }
- const char *numprocessors() const { return value(OSDOPTION_NUMPROCESSORS); }
- int bench() const { return int_value(OSDOPTION_BENCH); }
-
- // video options
- const char *video() const { return value(OSDOPTION_VIDEO); }
- int numscreens() const { return int_value(OSDOPTION_NUMSCREENS); }
- bool window() const { return bool_value(OSDOPTION_WINDOW); }
- bool maximize() const { return bool_value(OSDOPTION_MAXIMIZE); }
- bool keep_aspect() const { return bool_value(OSDOPTION_KEEPASPECT); }
- bool uneven_stretch() const { return bool_value(OSDOPTION_UNEVENSTRETCH); }
- bool wait_vsync() const { return bool_value(OSDOPTION_WAITVSYNC); }
- bool sync_refresh() const { return bool_value(OSDOPTION_SYNCREFRESH); }
-
- // per-window options
- const char *screen() const { return value(OSDOPTION_SCREEN); }
- const char *aspect() const { return value(OSDOPTION_ASPECT); }
- const char *resolution() const { return value(OSDOPTION_RESOLUTION); }
- const char *view() const { return value(OSDOPTION_VIEW); }
- const char *screen(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_SCREEN, index)); }
- const char *aspect(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_ASPECT, index)); }
- const char *resolution(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_RESOLUTION, index)); }
- const char *view(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_VIEW, index)); }
-
- // full screen options
- bool switch_res() const { return bool_value(OSDOPTION_SWITCHRES); }
-
- // sound options
- const char *sound() const { return value(OSDOPTION_SOUND); }
- int audio_latency() const { return int_value(OSDOPTION_AUDIO_LATENCY); }
+ // construction/destruction
+ osd_options();
+
+ // debugging options
+ const char *debugger() const { return value(OSDOPTION_DEBUGGER); }
+ int watchdog() const { return int_value(OSDOPTION_WATCHDOG); }
+
+ // performance options
+ bool multithreading() const { return bool_value(OSDOPTION_MULTITHREADING); }
+ const char *numprocessors() const { return value(OSDOPTION_NUMPROCESSORS); }
+ int bench() const { return int_value(OSDOPTION_BENCH); }
+
+ // video options
+ const char *video() const { return value(OSDOPTION_VIDEO); }
+ int numscreens() const { return int_value(OSDOPTION_NUMSCREENS); }
+ bool window() const { return bool_value(OSDOPTION_WINDOW); }
+ bool maximize() const { return bool_value(OSDOPTION_MAXIMIZE); }
+ bool keep_aspect() const { return bool_value(OSDOPTION_KEEPASPECT); }
+ bool uneven_stretch() const { return bool_value(OSDOPTION_UNEVENSTRETCH); }
+ bool wait_vsync() const { return bool_value(OSDOPTION_WAITVSYNC); }
+ bool sync_refresh() const { return bool_value(OSDOPTION_SYNCREFRESH); }
+
+ // per-window options
+ const char *screen() const { return value(OSDOPTION_SCREEN); }
+ const char *aspect() const { return value(OSDOPTION_ASPECT); }
+ const char *resolution() const { return value(OSDOPTION_RESOLUTION); }
+ const char *view() const { return value(OSDOPTION_VIEW); }
+ const char *screen(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_SCREEN, index)); }
+ const char *aspect(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_ASPECT, index)); }
+ const char *resolution(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_RESOLUTION, index)); }
+ const char *view(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_VIEW, index)); }
+
+ // full screen options
+ bool switch_res() const { return bool_value(OSDOPTION_SWITCHRES); }
+
+ // sound options
+ const char *sound() const { return value(OSDOPTION_SOUND); }
+ int audio_latency() const { return int_value(OSDOPTION_AUDIO_LATENCY); }
private:
- static const options_entry s_option_entries[];
+ static const options_entry s_option_entries[];
};
// ======================> osd_interface
@@ -142,77 +142,77 @@ public:
// video overridables
virtual void *get_slider_list();
- // command option overrides
- virtual bool execute_command(const char *command);
+ // command option overrides
+ virtual bool execute_command(const char *command);
- osd_font *font_alloc() { return m_font_module->font_alloc(); }
+ osd_font *font_alloc() { return m_font_module->font_alloc(); }
// FIXME: everything below seems to be osd specific and not part of
// this INTERFACE but part of the osd IMPLEMENTATION
- // getters
- running_machine &machine() { assert(m_machine != NULL); return *m_machine; }
+ // getters
+ running_machine &machine() { assert(m_machine != NULL); return *m_machine; }
- virtual void debugger_update();
+ virtual void debugger_update();
- virtual void init_subsystems();
+ virtual void init_subsystems();
- virtual bool video_init();
- virtual void video_register();
- virtual bool window_init();
+ virtual bool video_init();
+ virtual void video_register();
+ virtual bool window_init();
- virtual void input_resume();
- virtual bool output_init();
- virtual bool network_init();
- virtual bool midi_init();
+ virtual void input_resume();
+ virtual bool output_init();
+ virtual bool network_init();
+ virtual bool midi_init();
- virtual void exit_subsystems();
- virtual void video_exit();
- virtual void window_exit();
- virtual void input_exit();
- virtual void output_exit();
- virtual void network_exit();
- virtual void midi_exit();
+ virtual void exit_subsystems();
+ virtual void video_exit();
+ virtual void window_exit();
+ virtual void input_exit();
+ virtual void output_exit();
+ virtual void network_exit();
+ virtual void midi_exit();
- virtual void osd_exit();
+ virtual void osd_exit();
- virtual void video_options_add(const char *name, void *type);
+ virtual void video_options_add(const char *name, void *type);
- osd_options &options() { return m_options; }
+ osd_options &options() { return m_options; }
protected:
- virtual bool input_init();
- virtual void input_pause();
+ virtual bool input_init();
+ virtual void input_pause();
private:
// internal state
running_machine * m_machine;
osd_options& m_options;
- osd_module_manager m_mod_man;
- font_module *m_font_module;
+ osd_module_manager m_mod_man;
+ font_module *m_font_module;
void update_option(const char * key, dynamic_array<const char *> &values);
- // FIXME: should be elsewhere
- osd_module *select_module_options(const core_options &opts, const astring &opt_name)
- {
- astring opt_val = opts.value(opt_name);
- if (opt_val == "auto")
- opt_val = "";
- else if (!m_mod_man.type_has_name(opt_name, opt_val))
- {
- osd_printf_warning("Value %s not supported for option %s - falling back to auto\n", opt_val.cstr(), opt_name.cstr());
- opt_val = "";
- }
- return m_mod_man.select_module(opt_name, opt_val);
- }
-
- template<class C>
- C select_module_options(const core_options &opts, const astring &opt_name)
- {
- return dynamic_cast<C>(select_module_options(opts, opt_name));
- }
+ // FIXME: should be elsewhere
+ osd_module *select_module_options(const core_options &opts, const astring &opt_name)
+ {
+ astring opt_val = opts.value(opt_name);
+ if (opt_val == "auto")
+ opt_val = "";
+ else if (!m_mod_man.type_has_name(opt_name, opt_val))
+ {
+ osd_printf_warning("Value %s not supported for option %s - falling back to auto\n", opt_val.cstr(), opt_name.cstr());
+ opt_val = "";
+ }
+ return m_mod_man.select_module(opt_name, opt_val);
+ }
+
+ template<class C>
+ C select_module_options(const core_options &opts, const astring &opt_name)
+ {
+ return dynamic_cast<C>(select_module_options(opts, opt_name));
+ }
protected:
sound_module* m_sound;