Merge branch 'master' of ssh://mess.org/mame

This commit is contained in:
Nathan Woods 2014-01-19 14:32:36 +00:00
commit c1158bbabf
4 changed files with 29 additions and 18 deletions

View File

@ -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))

View File

@ -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);

View File

@ -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());
}

View File

@ -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);