本文整理汇总了C++中running_machine::schedule_exit方法的典型用法代码示例。如果您正苦于以下问题:C++ running_machine::schedule_exit方法的具体用法?C++ running_machine::schedule_exit怎么用?C++ running_machine::schedule_exit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类running_machine
的用法示例。
在下文中一共展示了running_machine::schedule_exit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: command_end
static void command_end(running_machine &machine)
{
/* at the end of our test */
state = STATE_DONE;
final_time = machine.time();
machine.schedule_exit();
}
示例2: process_window_event
void sdl_event_manager::process_window_event(running_machine &machine, SDL_Event &sdlevent)
{
sdl_window_info *window = GET_WINDOW(&sdlevent.window);
if (window == NULL)
return;
switch (sdlevent.window.event)
{
case SDL_WINDOWEVENT_CLOSE:
machine.schedule_exit();
break;
case SDL_WINDOWEVENT_LEAVE:
machine.ui_input().push_mouse_leave_event(window->target());
m_app_has_mouse_focus = 0;
break;
case SDL_WINDOWEVENT_MOVED:
window->notify_changed();
m_focus_window = window;
break;
case SDL_WINDOWEVENT_RESIZED:
#ifndef SDLMAME_WIN32
/* FIXME: SDL2 sends some spurious resize events on Ubuntu
* while in fullscreen mode. Ignore them for now.
*/
if (!window->fullscreen())
#endif
{
//printf("event data1,data2 %d x %d %ld\n", event.window.data1, event.window.data2, sizeof(SDL_Event));
window->resize(sdlevent.window.data1, sdlevent.window.data2);
}
m_focus_window = window;
break;
case SDL_WINDOWEVENT_ENTER:
m_app_has_mouse_focus = 1;
/* fall through */
case SDL_WINDOWEVENT_FOCUS_GAINED:
case SDL_WINDOWEVENT_EXPOSED:
case SDL_WINDOWEVENT_MAXIMIZED:
case SDL_WINDOWEVENT_RESTORED:
m_focus_window = window;
break;
}
}
示例3: osd_update
void osd_update(running_machine &machine, int skip_redraw)
{
int i;
attotime time_limit;
attotime current_time;
target->get_primitives();
/* don't do anything if we are initializing! */
switch(machine.phase())
{
case MACHINE_PHASE_PREINIT:
case MACHINE_PHASE_INIT:
case MACHINE_PHASE_RESET:
return;
default: break;
}
/* if we have already aborted or completed, our work is done */
if ((state == STATE_ABORTED) || (state == STATE_DONE))
{
machine.schedule_exit();
return;
}
/* have we hit the time limit? */
current_time = machine.time();
time_limit = (current_testcase.time_limit != attotime::zero) ? current_testcase.time_limit
: attotime::from_seconds(600);
if (current_time > time_limit)
{
state = STATE_ABORTED;
report_message(MSG_FAILURE, "Time limit of %s attoseconds exceeded", time_limit.as_string(9));
return;
}
for (i = 0; i < ARRAY_LENGTH(commands); i++)
{
if (current_command->command_type == commands[i].command_type)
{
commands[i].proc(machine);
break;
}
}
/* if we are ready for the next command, advance to it */
if (state == STATE_READY)
{
/* if we are at the end, and we are dumping screenshots, and we didn't
* just dump a screenshot, dump one now
*/
if ((test_flags & MESSTEST_ALWAYS_DUMP_SCREENSHOT) &&
(current_command[0].command_type != MESSTEST_COMMAND_SCREENSHOT) &&
(current_command[1].command_type == MESSTEST_COMMAND_END))
{
dump_screenshot(machine, TRUE);
}
current_command++;
}
}