int osd_update(mame_time emutime) { win_window_info *window; // if we're throttling, paused, or if the UI is up, synchronize if (effective_throttle()) update_throttle(emutime); // update the FPS computations update_fps(emutime); // update all the windows, but only if we're not skipping this frame if (!skiptable[effective_frameskip()][frameskip_counter]) { profiler_mark(PROFILER_BLIT); for (window = win_window_list; window != NULL; window = window->next) winwindow_video_window_update(window); profiler_mark(PROFILER_END); } // if we're throttling and autoframeskip is on, adjust if (effective_throttle() && effective_autoframeskip() && frameskip_counter == 0) update_autoframeskip(); // poll the joystick values here winwindow_process_events(TRUE); wininput_poll(); check_osd_inputs(); // increment the frameskip counter frameskip_counter = (frameskip_counter + 1) % FRAMESKIP_LEVELS; // return whether or not to skip the next frame return skiptable[effective_frameskip()][frameskip_counter]; }
static void update_timing() { cycles_t curr; if (fastfrms >= 0) { if (fastfrms-- == 0) throttle = 1; else throttle = 0; } // if we're throttling, synchronize if (throttle || game_is_paused) throttle_speed(); // at the end, we need the current time curr = osd_cycles(); // update stats for the FPS average calculation if (start_time == 0) { // start the timer going 1 second into the game if (timer_get_time() > 1.0) start_time = curr; } else { frames_displayed++; if (frames_displayed + 1 == frames_to_display) win_trying_to_quit = 1; end_time = curr; } // if we're at the start of a frameskip sequence, compute the speed if (frameskip_counter == 0) last_skipcount0_time = curr; //// update the bitmap we're drawing //profiler_mark(PROFILER_BLIT); //win_update_video_window(bitmap, bounds, vector_dirty_pixels); //profiler_mark(PROFILER_END); // if we're throttling and autoframeskip is on, adjust if (throttle && autoframeskip && frameskip_counter == 0) update_autoframeskip(); }