Skip to content

Commit

Permalink
Make utils/rzxplay.py interpret '--fps 0' as maximum speed
Browse files Browse the repository at this point in the history
  • Loading branch information
skoolkid committed Feb 15, 2024
1 parent cf48317 commit 637b6a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils/rzxplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def process_block(block, options, snapshot, screen, p_rectangles, c_rectangles,
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
clock.tick(options.fps)
if options.fps > 0:
clock.tick(options.fps)
prev_scr = memory[16384:23296]
registers[25] = 0
if simulator.iff:
Expand Down Expand Up @@ -300,7 +301,8 @@ def run(infile, options):
group.add_argument('--force', action='store_true',
help="Force playback when unsupported hardware is detected.")
group.add_argument('--fps', type=int, default=50,
help="Run at this many frames per second.")
help="Run at this many frames per second (default: 50). "
"0 means maximum speed.")
group.add_argument('--no-screen', dest='screen', action='store_false',
help="Run without a screen.")
group.add_argument('--quiet', action='store_true',
Expand Down

0 comments on commit 637b6a4

Please sign in to comment.