From 9a12ab37afb3e43d9d3c296b34348b835bafb2ea Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Thu, 26 Sep 2019 20:53:06 +1000 Subject: Make osd_printf_* use util/strformat semantics. (nw) This has been a long time coming but it's here at last. It should be easier now that logerror, popmessage and osd_printf_* behave like string_format and stream_format. Remember the differences from printf: * Any object with a stream out operator works with %s * %d, %i, %o, %x, %X, etc. work out the size by magic * No sign extending promotion to int for short/char * No widening/narrowing conversions for characters/strings * Same rules on all platforms, insulated from C runtime library * No format warnings from compiler * Assert in debug builds if number of arguments doesn't match format (nw) Also removed a pile of redundant c_str and string_format, and some workarounds for not being able to portably format 64-bit integers or long long. --- src/emu/inputdev.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/emu/inputdev.cpp') diff --git a/src/emu/inputdev.cpp b/src/emu/inputdev.cpp index a9e8fee7491..66480068a14 100644 --- a/src/emu/inputdev.cpp +++ b/src/emu/inputdev.cpp @@ -423,7 +423,7 @@ input_device_joystick::input_device_joystick(input_manager &manager, const char m_joymap.parse(input_class_joystick::map_8way); } else if (mapstring != input_class_joystick::map_8way) - osd_printf_verbose("Input: Default joystick map = %s\n", m_joymap.to_string().c_str()); + osd_printf_verbose("Input: Default joystick map = %s\n", m_joymap.to_string()); } @@ -648,7 +648,7 @@ bool input_class_joystick::set_global_joystick_map(const char *mapstring) if (!map.parse(mapstring)) return false; - osd_printf_verbose("Input: Changing default joystick map = %s\n", map.to_string().c_str()); + osd_printf_verbose("Input: Changing default joystick map = %s\n", map.to_string()); // iterate over joysticks and set the map for (int joynum = 0; joynum <= maxindex(); joynum++) -- cgit v1.2.3-70-g09d2