void sdlwindow_video_window_update_hi(running_machine &machine, sdl_window_info *window) { ASSERT_MAIN_THREAD(); // adjust the cursor state sdlwindow_update_cursor_state(machine, window); }
void sdlwindow_video_window_update(running_machine &machine, sdl_window_info *window) { osd_ticks_t event_wait_ticks; ASSERT_MAIN_THREAD(); // adjust the cursor state sdlwindow_update_cursor_state(machine, window); // if we're visible and running and not in the middle of a resize, draw if (window->target != NULL) { int tempwidth, tempheight; // see if the games video mode has changed window->target->compute_minimum_size(tempwidth, tempheight); if (tempwidth != window->minwidth || tempheight != window->minheight) { window->minwidth = tempwidth; window->minheight = tempheight; if (!window->fullscreen) { sdlwindow_blit_surface_size(window, window->width, window->height); sdlwindow_resize(window, window->blitwidth, window->blitheight); } else if (video_config.switchres) { pick_best_mode(window, &tempwidth, &tempheight); sdlwindow_resize(window, tempwidth, tempheight); } } if (video_config.waitvsync && video_config.syncrefresh) event_wait_ticks = osd_ticks_per_second(); // block at most a second else event_wait_ticks = 0; if (osd_event_wait(window->rendered_event, event_wait_ticks)) { worker_param wp; render_primitive_list *primlist; clear_worker_param(&wp); // ensure the target bounds are up-to-date, and then get the primitives primlist = &window->get_primitives(window); // and redraw now wp.list = primlist; wp.window = window; wp.m_machine = &machine; execute_async(&draw_video_contents_wt, &wp); } } }
void sdlwindow_video_window_update(running_machine *machine, sdl_window_info *window) { ASSERT_MAIN_THREAD(); // adjust the cursor state sdlwindow_update_cursor_state(machine, window); // if we're visible and running and not in the middle of a resize, draw if (window->target != NULL) { int tempwidth, tempheight; // see if the games video mode has changed render_target_get_minimum_size(window->target, &tempwidth, &tempheight); if (tempwidth != window->minwidth || tempheight != window->minheight) { window->minwidth = tempwidth; window->minheight = tempheight; if (!window->fullscreen) { sdlwindow_blit_surface_size(window, window->width, window->height); sdlwindow_resize(window, window->blitwidth, window->blitheight); } else if (video_config.switchres) { pick_best_mode(window, &tempwidth, &tempheight); sdlwindow_resize(window, tempwidth, tempheight); } } // only render if we have been signalled if (osd_event_wait(window->rendered_event, 0)) { worker_param wp; const render_primitive_list *primlist; clear_worker_param(&wp); // ensure the target bounds are up-to-date, and then get the primitives primlist = window->get_primitives(window); // and redraw now wp.list = primlist; wp.window = window; wp.machine = machine; execute_async(&draw_video_contents_wt, &wp); } } }