Skip to content

Commit

Permalink
throttle framerate on osx metal too when in background as catalina se…
Browse files Browse the repository at this point in the history
…ems to have the same issue as previous versions had with gl
  • Loading branch information
ianmaclarty committed Jan 31, 2020
1 parent 69fa346 commit a447060
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/am_backend_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,9 @@ int main( int argc, char *argv[] )
t0 = frame_time;

if (!have_focus) {
#if defined(AM_OSX) && !defined(AM_USE_METAL)
// throttle framerate when in background on osx gl (otherwise cpu goes through the roof)
usleep(10 * 1000); // 10 milliseconds
#if defined(AM_OSX)
// throttle framerate when in background on osx, otherwise cpu usage becomes very high for unknown reasons
usleep(50 * 1000); // 50 milliseconds
#endif
}
}
Expand Down

0 comments on commit a447060

Please sign in to comment.