summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/gba
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-09-26 20:53:06 +1000
committer Vas Crabb <vas@vastheman.com>2019-09-26 20:53:06 +1000
commit9a12ab37afb3e43d9d3c296b34348b835bafb2ea (patch)
tree6af7ce1fc5f52b1518100a1be926514cd2f34feb /src/devices/bus/gba
parent9d4b7b02acdb79fac05606f57c3fddd08593cba8 (diff)
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.
Diffstat (limited to 'src/devices/bus/gba')
-rw-r--r--src/devices/bus/gba/gba_slot.cpp4
-rw-r--r--src/devices/bus/gba/rom.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/bus/gba/gba_slot.cpp b/src/devices/bus/gba/gba_slot.cpp
index 0e926ff1d91..c99376e02e4 100644
--- a/src/devices/bus/gba/gba_slot.cpp
+++ b/src/devices/bus/gba/gba_slot.cpp
@@ -761,7 +761,7 @@ int gba_cart_slot_device::get_cart_type(const uint8_t *ROM, uint32_t len)
else if ((i<len-8) && !memcmp(&ROM[i], "SIIRTC_V", 8))
chip |= GBA_CHIP_RTC;
}
- osd_printf_info("GBA: Detected (ROM) %s\n", gba_chip_string(chip).c_str());
+ osd_printf_info("GBA: Detected (ROM) %s\n", gba_chip_string(chip));
// fix for games which return more than one kind of chip: either it is one of the known titles, or we default to no battery
if (gba_chip_has_conflict(chip))
@@ -829,7 +829,7 @@ int gba_cart_slot_device::get_cart_type(const uint8_t *ROM, uint32_t len)
has_rtc = true;
}
- osd_printf_info("GBA: Emulate %s\n", gba_chip_string(chip).c_str());
+ osd_printf_info("GBA: Emulate %s\n", gba_chip_string(chip));
switch (chip)
{
diff --git a/src/devices/bus/gba/rom.cpp b/src/devices/bus/gba/rom.cpp
index e1c61ec0f49..aaf58253a35 100644
--- a/src/devices/bus/gba/rom.cpp
+++ b/src/devices/bus/gba/rom.cpp
@@ -1060,7 +1060,7 @@ void gba_eeprom_device::write(uint32_t data)
if (m_bits == 0)
{
- osd_printf_verbose("%s: EEPROM: %02x to %x\n", machine().describe_context().c_str(), m_eep_data, m_addr);
+ osd_printf_verbose("%s: EEPROM: %02x to %x\n", machine().describe_context(), m_eep_data, m_addr);
if (m_addr >= m_data_size)
fatalerror("eeprom: invalid address (%x)\n", m_addr);