Commit 26590dd
committed
cocoa_gl_ctx: gate CGDisplayModeRef refresh-rate read on 10.6 SDK
GCC 4.0 (Xcode 3.1, PowerPC) reports:
cocoa_gl_ctx.m:251: error: 'CGDisplayModeRef' undeclared
(first use in this function)
CGDisplayModeRef, CGDisplayCopyDisplayMode, and CGDisplayModeGet-
RefreshRate all arrived in 10.6 Snow Leopard. The 10.5 Leopard
SDK only exposes the older CFDictionaryRef-based CGDisplayCurrent-
Mode API, which is a different enough shape that it's not worth
wiring up for a single refresh-rate readout.
Gate the existing OSX block on MAC_OS_X_VERSION_10_6 (defined only
on 10.6+ SDKs). On older SDKs, return 60.0f — same pattern the
iOS #else branch already uses for targets older than iOS 10.3 /
tvOS 10.2 that don't have maximumFramesPerSecond.
Related: 667256a gated the same CGDisplayModeRef family in
dispserv_apple.m behind a RARCH_HAS_CGDISPLAYMODE_API macro. This
change uses the raw SDK gate (MAC_OS_X_VERSION_10_6) to stay
consistent with the other MAC_OS_X_VERSION_* gates already in this
file at lines 206, 298, 375, 396, 402, 610.
Modern macOS builds are unaffected.1 parent 345a2ef commit 26590dd
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
250 | 255 | | |
251 | 256 | | |
252 | 257 | | |
253 | 258 | | |
254 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
255 | 263 | | |
256 | 264 | | |
257 | 265 | | |
| |||
0 commit comments