Skip to content

Commit

Permalink
bugfix: better fix for #1595
Browse files Browse the repository at this point in the history
Only sleep if we have emulation paused, to avoid slowing things down
  • Loading branch information
midwan committed Jan 17, 2025
1 parent e8ed4c8 commit e2feb3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/osdep/amiberry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1879,8 +1879,8 @@ bool handle_events()
sound_closed = 0;
was_paused = 0;
}
// Insert a 10ms delay to prevent 100% CPU usage
SDL_Delay(10);
if (pause_emulation)
SDL_Delay(10);
return pause_emulation != 0;
}

Expand Down

1 comment on commit e2feb3c

@giantclambake
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kudos ~ works as expected now =)

Please sign in to comment.