frame_rate_pusher.tcl 496 B

123456789101112131415161718
  1. # This is a special script to force frame draws, even though there is nothing
  2. # new to draw. Some platforms (like SDL on Android) require this to read input
  3. # regularly. The value of 0.04 gives about 25 fps updates.
  4. namespace eval frame_rate_pusher {
  5. proc move_frp {} {
  6. osd configure frp -x [expr {1 - [osd info frp -x]}]
  7. after realtime 0.04 [namespace code move_frp]
  8. }
  9. if {[string match android "[openmsx_info platform]"]} {
  10. osd create rectangle frp -alpha 0 -w 1 -h 1 -x 0
  11. move_frp
  12. }
  13. }