summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2022-02-04 14:23:00 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2022-02-04 14:25:32 +0200
commit74d4343beb74424b400f5f65e620abf98b8c1562 (patch)
tree112db13930cf1b6fdae4eb742839f74774247366 /src
parent99d6297a58c08926d4316b80c720ac602e236e6c (diff)
macOS: Use Metal on >60 Hz displays
The problem with the occasional stutters related to SDL_WaitEvent() are still there, but on a 120 Hz display it's even worse to be stuck on 60 Hz. Metal is required for 120 Hz.
Diffstat (limited to 'src')
-rw-r--r--src/macos.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/macos.m b/src/macos.m
index 1019d13d..ad236784 100644
--- a/src/macos.m
+++ b/src/macos.m
@@ -72,10 +72,10 @@ static NSString *currentSystemAppearance_(void) {
72} 72}
73 73
74iBool shouldDefaultToMetalRenderer_MacOS(void) { 74iBool shouldDefaultToMetalRenderer_MacOS(void) {
75 /* TODO: Test if SDL 2.0.16 works better (no stutters with Metal?). */
76 return iFalse; /*
77 const iInt2 ver = macVer_(); 75 const iInt2 ver = macVer_();
78 return ver.x > 10 || ver.y > 13;*/ 76 SDL_DisplayMode dispMode;
77 SDL_GetDesktopDisplayMode(0, &dispMode);
78 return dispMode.refresh_rate > 60 && (ver.x > 10 || ver.y > 13);
79} 79}
80 80
81static void ignoreImmediateKeyDownEvents_(void) { 81static void ignoreImmediateKeyDownEvents_(void) {