mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
Revert "ui: remove clock freqs trailing 0s on machine info screen (nw)"
This reverts commit 64c1136440
.
This commit is contained in:
parent
64c1136440
commit
dce2324ff4
@ -69,16 +69,16 @@ void menu_device_config::populate(float &customtop, float &custombottom)
|
||||
count++;
|
||||
}
|
||||
|
||||
int n = (clock >= 1000000) ? (clock / 1000000) : (clock / 1000);
|
||||
int d = (clock >= 1000000) ? (clock % 1000000) : (clock % 1000);
|
||||
while (d != 0 && (d % 10) == 0)
|
||||
d /= 10;
|
||||
|
||||
// if more than one, prepend a #x in front of the CPU name and display clock in kHz or MHz
|
||||
util::stream_format(str,
|
||||
(count > 1) ? " %1$d" UTF8_MULTIPLY "%2$s %3$d.%4$d" UTF8_NBSP "%5$s\n" : " %2$s %3$d.%4$d" UTF8_NBSP "%5$s\n",
|
||||
count, name, n, d,
|
||||
(clock >= 1000000) ? _("MHz") : _("kHz"));
|
||||
util::stream_format(
|
||||
str,
|
||||
(count > 1)
|
||||
? ((clock >= 1000000) ? _(" %1$d\xC3\x97%2$s %3$d.%4$06d\xC2\xA0MHz\n") : _(" %1$d\xC3\x97%2$s %5$d.%6$03d\xC2\xA0kHz\n"))
|
||||
: ((clock >= 1000000) ? _(" %2$s %3$d.%4$06d\xC2\xA0MHz\n") : _(" %2$s %5$d.%6$03d\xC2\xA0kHz\n")),
|
||||
count,
|
||||
name,
|
||||
clock / 1000000, clock % 1000000,
|
||||
clock / 1000, clock % 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,23 +90,22 @@ void menu_device_config::populate(float &customtop, float &custombottom)
|
||||
for (screen_device &screen : scriter)
|
||||
{
|
||||
if (screen.screen_type() == SCREEN_TYPE_VECTOR)
|
||||
{
|
||||
util::stream_format(str, _(" Screen '%1$s': Vector\n"), screen.tag());
|
||||
}
|
||||
else
|
||||
{
|
||||
double f = screen.frame_period().as_hz();
|
||||
int n = int(f), d = int(f * 1000000.0) % 1000000;
|
||||
while (d != 0 && (d % 10) == 0)
|
||||
d /= 10;
|
||||
|
||||
const rectangle &visarea = screen.visible_area();
|
||||
util::stream_format(str,
|
||||
|
||||
util::stream_format(
|
||||
str,
|
||||
(screen.orientation() & ORIENTATION_SWAP_XY)
|
||||
? _(" Screen '%1$s': %2$d \xC3\x97 %3$d (V) %4$d.%5$d\xC2\xA0Hz\n")
|
||||
: _(" Screen '%1$s': %2$d \xC3\x97 %3$d (H) %4$d.%5$d\xC2\xA0Hz\n"),
|
||||
? _(" Screen '%1$s': %2$d \xC3\x97 %3$d (V) %4$f\xC2\xA0Hz\n")
|
||||
: _(" Screen '%1$s': %2$d \xC3\x97 %3$d (H) %4$f\xC2\xA0Hz\n"),
|
||||
screen.tag(),
|
||||
visarea.width(),
|
||||
visarea.height(),
|
||||
n, d);
|
||||
screen.frame_period().as_hz());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -130,20 +129,17 @@ void menu_device_config::populate(float &customtop, float &custombottom)
|
||||
if (soundtags.insert(scan.device().tag()).second)
|
||||
count++;
|
||||
}
|
||||
|
||||
int const clock = sound.device().clock();
|
||||
int n = (clock >= 1000000) ? (clock / 1000000) : (clock / 1000);
|
||||
int d = (clock >= 1000000) ? (clock % 1000000) : (clock % 1000);
|
||||
while (d != 0 && (d % 10) == 0)
|
||||
d /= 10;
|
||||
|
||||
// if more than one, prepend a #x in front of the name and display clock in kHz or MHz
|
||||
util::stream_format(str,
|
||||
int const clock = sound.device().clock();
|
||||
util::stream_format(
|
||||
str,
|
||||
(count > 1)
|
||||
? ((clock != 0) ? " %1$d" UTF8_MULTIPLY "%2$s %3$d.%4$d" UTF8_NBSP "%5$s\n" : " %1$d" UTF8_MULTIPLY "%2$s\n")
|
||||
: ((clock != 0) ? " %2$s %3$d.%4$d" UTF8_NBSP "%5$s\n" : " %2$s\n"),
|
||||
count, sound.device().name(), n, d,
|
||||
(clock >= 1000000) ? _("MHz") : _("kHz"));
|
||||
? ((clock >= 1000000) ? _(" %1$d\xC3\x97%2$s %3$d.%4$06d\xC2\xA0MHz\n") : clock ? _(" %1$d\xC3\x97%2$s %5$d.%6$03d\xC2\xA0kHz\n") : _(" %1$d\xC3\x97%2$s\n"))
|
||||
: ((clock >= 1000000) ? _(" %2$s %3$d.%4$06d\xC2\xA0MHz\n") : clock ? _(" %2$s %5$d.%6$03d\xC2\xA0kHz\n") : _(" %2$s\n")),
|
||||
count,
|
||||
sound.device().name(),
|
||||
clock / 1000000, clock % 1000000,
|
||||
clock / 1000, clock % 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -325,16 +325,15 @@ std::string machine_info::game_info_string() const
|
||||
count++;
|
||||
}
|
||||
|
||||
int n = (clock >= 1000000) ? (clock / 1000000) : (clock / 1000);
|
||||
int d = (clock >= 1000000) ? (clock % 1000000) : (clock % 1000);
|
||||
while (d != 0 && (d % 10) == 0)
|
||||
d /= 10;
|
||||
|
||||
// if more than one, prepend a #x in front of the CPU name
|
||||
// display clock in kHz or MHz
|
||||
util::stream_format(buf,
|
||||
(count > 1) ? "%1$d" UTF8_MULTIPLY "%2$s %3$d.%4$d" UTF8_NBSP "%5$s\n" : "%2$s %3$d.%4$d" UTF8_NBSP "%5$s\n",
|
||||
count, name, n, d,
|
||||
(count > 1) ? "%1$d" UTF8_MULTIPLY "%2$s %3$d.%4$0*5$d%6$s\n" : "%2$s %3$d.%4$0*5$d%6$s\n",
|
||||
count,
|
||||
name,
|
||||
(clock >= 1000000) ? (clock / 1000000) : (clock / 1000),
|
||||
(clock >= 1000000) ? (clock % 1000000) : (clock % 1000),
|
||||
(clock >= 1000000) ? 6 : 3,
|
||||
(clock >= 1000000) ? _("MHz") : _("kHz"));
|
||||
}
|
||||
|
||||
@ -361,19 +360,18 @@ std::string machine_info::game_info_string() const
|
||||
count++;
|
||||
}
|
||||
|
||||
int clock = sound.device().clock();
|
||||
int n = (clock >= 1000000) ? (clock / 1000000) : (clock / 1000);
|
||||
int d = (clock >= 1000000) ? (clock % 1000000) : (clock % 1000);
|
||||
while (d != 0 && (d % 10) == 0)
|
||||
d /= 10;
|
||||
|
||||
// if more than one, prepend a #x in front of the sound chip name
|
||||
// if more than one, prepend a #x in front of the CPU name
|
||||
// display clock in kHz or MHz
|
||||
int clock = sound.device().clock();
|
||||
util::stream_format(buf,
|
||||
(count > 1)
|
||||
? ((clock != 0) ? "%1$d" UTF8_MULTIPLY "%2$s %3$d.%4$d" UTF8_NBSP "%5$s\n" : "%1$d" UTF8_MULTIPLY "%2$s\n")
|
||||
: ((clock != 0) ? "%2$s %3$d.%4$d" UTF8_NBSP "%5$s\n" : "%2$s\n"),
|
||||
count, sound.device().name(), n, d,
|
||||
? ((clock != 0) ? "%1$d" UTF8_MULTIPLY "%2$s %3$d.%4$0*5$d%6$s\n" : "%1$d" UTF8_MULTIPLY "%2$s\n")
|
||||
: ((clock != 0) ? "%2$s %3$d.%4$0*5$d%6$s\n" : "%2$s\n"),
|
||||
count,
|
||||
sound.device().name(),
|
||||
(clock >= 1000000) ? (clock / 1000000) : (clock / 1000),
|
||||
(clock >= 1000000) ? (clock % 1000000) : (clock % 1000),
|
||||
(clock >= 1000000) ? 6 : 3,
|
||||
(clock >= 1000000) ? _("MHz") : _("kHz"));
|
||||
}
|
||||
|
||||
@ -392,16 +390,11 @@ std::string machine_info::game_info_string() const
|
||||
detail = _("Vector");
|
||||
else
|
||||
{
|
||||
double f = screen.frame_period().as_hz();
|
||||
int n = int(f), d = int(f * 1000000.0) % 1000000;
|
||||
while (d != 0 && (d % 10) == 0)
|
||||
d /= 10;
|
||||
|
||||
const rectangle &visarea = screen.visible_area();
|
||||
detail = string_format("%d " UTF8_MULTIPLY " %d (%s) %d.%d" UTF8_NBSP "Hz",
|
||||
detail = string_format("%d " UTF8_MULTIPLY " %d (%s) %f" UTF8_NBSP "Hz",
|
||||
visarea.width(), visarea.height(),
|
||||
(screen.orientation() & ORIENTATION_SWAP_XY) ? "V" : "H",
|
||||
n, d);
|
||||
screen.frame_period().as_hz());
|
||||
}
|
||||
|
||||
util::stream_format(buf,
|
||||
|
Loading…
Reference in New Issue
Block a user