diff options
author | 2015-05-02 19:41:03 +0200 | |
---|---|---|
committer | 2015-05-02 19:41:03 +0200 | |
commit | cc3b682e52bf097d31db78032aad01d6a0b12e94 (patch) | |
tree | 860c97ca011b64c31a5ad277f5cea2b1d86eeaf0 /src/osd/modules/lib/osdobj_common.h | |
parent | 7df6a23ba2ae1c1df94ed8cc2398f2546f339997 (diff) | |
parent | a649a95488e1fc85813dda747dc74c596496bd1c (diff) |
Merge pull request #1 from mamedev/master
Sync to master
Diffstat (limited to 'src/osd/modules/lib/osdobj_common.h')
-rw-r--r-- | src/osd/modules/lib/osdobj_common.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h index e6a2a7a0311..d46463b414d 100644 --- a/src/osd/modules/lib/osdobj_common.h +++ b/src/osd/modules/lib/osdobj_common.h @@ -113,10 +113,10 @@ public: 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).c_str()); } - const char *aspect(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_ASPECT, index).c_str()); } - const char *resolution(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_RESOLUTION, index).c_str()); } - const char *view(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_VIEW, index).c_str()); } + const char *screen(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_SCREEN, index); return value(temp.c_str()); } + const char *aspect(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_ASPECT, index); return value(temp.c_str()); } + const char *resolution(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_RESOLUTION, index); return value(temp.c_str()); } + const char *view(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_VIEW, index); return value(temp.c_str()); } // full screen options bool switch_res() const { return bool_value(OSDOPTION_SWITCHRES); } @@ -136,12 +136,12 @@ public: bool gl_pbo() const { return bool_value(OSDOPTION_GL_PBO); } bool gl_glsl() const { return bool_value(OSDOPTION_GL_GLSL); } bool glsl_filter() const { return bool_value(OSDOPTION_GLSL_FILTER); } - const char *shader_mame(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_SHADER_MAME, index).c_str()); } - const char *shader_screen(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_SHADER_SCREEN, index).c_str()); } + const char *shader_mame(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_SHADER_MAME, index); return value(temp.c_str()); } + const char *shader_screen(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_SHADER_SCREEN, index); return value(temp.c_str()); } // CoreAudio specific options const char *audio_output() const { return value(OSDOPTION_AUDIO_OUTPUT); } - const char *audio_effect(int index) const { astring temp; return value(temp.format("%s%d", OSDOPTION_AUDIO_EFFECT, index).c_str()); } + const char *audio_effect(int index) const { std::string temp; strprintf(temp, "%s%d", OSDOPTION_AUDIO_EFFECT, index); return value(temp.c_str()); } private: static const options_entry s_option_entries[]; @@ -238,10 +238,10 @@ private: void update_option(const char * key, std::vector<const char *> &values); // FIXME: should be elsewhere - osd_module *select_module_options(const core_options &opts, const astring &opt_name) + osd_module *select_module_options(const core_options &opts, const std::string &opt_name) { - astring opt_val = opts.value(opt_name.c_str()); - if (opt_val == "auto") + std::string opt_val = opts.value(opt_name.c_str()); + if (opt_val.compare("auto")==0) opt_val = ""; else if (!m_mod_man.type_has_name(opt_name.c_str(), opt_val.c_str())) { @@ -252,7 +252,7 @@ private: } template<class C> - C select_module_options(const core_options &opts, const astring &opt_name) + C select_module_options(const core_options &opts, const std::string &opt_name) { return dynamic_cast<C>(select_module_options(opts, opt_name)); } |