summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/emu/ui.c12
-rw-r--r--src/emu/ui.h8
-rw-r--r--src/emu/video.c24
-rw-r--r--src/emu/video.h3
4 files changed, 29 insertions, 18 deletions
diff --git a/src/emu/ui.c b/src/emu/ui.c
index 1cc821ad7c6..3d272d57503 100644
--- a/src/emu/ui.c
+++ b/src/emu/ui.c
@@ -99,7 +99,7 @@ static UINT32 ui_handler_param;
static bool single_step;
/* FPS counter display */
-static int showfps;
+static bool showfps;
static osd_ticks_t showfps_end;
/* profiler display */
@@ -868,7 +868,7 @@ void ui_show_fps_temp(double seconds)
ui_set_show_fps - show/hide the FPS counter
-------------------------------------------------*/
-void ui_set_show_fps(int show)
+void ui_set_show_fps(bool show)
{
showfps = show;
if (!show)
@@ -884,7 +884,7 @@ void ui_set_show_fps(int show)
counter visibility state
-------------------------------------------------*/
-int ui_get_show_fps(void)
+bool ui_get_show_fps(void)
{
return showfps || (showfps_end != 0);
}
@@ -894,7 +894,7 @@ int ui_get_show_fps(void)
ui_set_show_profiler - show/hide the profiler
-------------------------------------------------*/
-void ui_set_show_profiler(int show)
+void ui_set_show_profiler(bool show)
{
show_profiler = show;
g_profiler.enable(show);
@@ -906,7 +906,7 @@ void ui_set_show_profiler(int show)
profiler visibility state
-------------------------------------------------*/
-int ui_get_show_profiler(void)
+bool ui_get_show_profiler(void)
{
return show_profiler;
}
@@ -1563,7 +1563,7 @@ static UINT32 handler_ingame(running_machine &machine, render_container *contain
/* toggle throttle? */
if (ui_input_pressed(machine, IPT_UI_THROTTLE))
- machine.video().set_throttled(!machine.video().throttled());
+ machine.video().toggle_throttle();
/* check for fast forward */
if (machine.ioport().type_pressed(IPT_UI_FAST_FORWARD))
diff --git a/src/emu/ui.h b/src/emu/ui.h
index 6ae570cc7fd..9822d3e9047 100644
--- a/src/emu/ui.h
+++ b/src/emu/ui.h
@@ -161,12 +161,12 @@ void CLIB_DECL ui_popup_time(int seconds, const char *text, ...) ATTR_PRINTF(2,3
/* get/set whether or not the FPS is displayed */
void ui_show_fps_temp(double seconds);
-void ui_set_show_fps(int show);
-int ui_get_show_fps(void);
+void ui_set_show_fps(bool show);
+bool ui_get_show_fps(void);
/* get/set whether or not the profiler is displayed */
-void ui_set_show_profiler(int show);
-int ui_get_show_profiler(void);
+void ui_set_show_profiler(bool show);
+bool ui_get_show_profiler(void);
/* force the menus to display */
void ui_show_menu(void);
diff --git a/src/emu/video.c b/src/emu/video.c
index c4621e1021c..8b3caf19d67 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -601,7 +601,7 @@ inline bool video_manager::effective_throttle() const
return false;
// otherwise, it's up to the user
- return m_throttle;
+ return throttled();
}
@@ -1184,7 +1184,6 @@ file_error video_manager::open_next(emu_file &file, const char *extension)
}
-
//-------------------------------------------------
// record_frame - record a frame of a movie
//-------------------------------------------------
@@ -1249,12 +1248,11 @@ void video_manager::record_frame()
}
-
-/*-------------------------------------------------
- video_assert_out_of_range_pixels - assert if
- any pixels in the given bitmap contain an
- invalid palette index
--------------------------------------------------*/
+//-------------------------------------------------
+// video_assert_out_of_range_pixels - assert if
+// any pixels in the given bitmap contain an
+// invalid palette index
+//-------------------------------------------------
bool video_assert_out_of_range_pixels(running_machine &machine, bitmap_ind16 &bitmap)
{
@@ -1274,3 +1272,13 @@ bool video_assert_out_of_range_pixels(running_machine &machine, bitmap_ind16 &bi
#endif
return false;
}
+
+
+//-------------------------------------------------
+// toggle_throttle
+//-------------------------------------------------
+
+void video_manager::toggle_throttle()
+{
+ set_throttled(!throttled());
+}
diff --git a/src/emu/video.h b/src/emu/video.h
index 9678e4c941e..1daf40608b1 100644
--- a/src/emu/video.h
+++ b/src/emu/video.h
@@ -72,6 +72,9 @@ public:
void set_fastforward(bool ffwd = true) { m_fastforward = ffwd; }
void set_output_changed() { m_output_changed = true; }
+ // misc
+ void toggle_throttle();
+
// render a frame
void frame_update(bool debug = false);