Post

Replies

Boosts

Views

Activity

CADisplayLink wrongly capping at 90hz on iPhone 15 Pro
I have a game for iOS where I use CADisplayLink to animate a simulation, and for some reason the animation is not getting the full 120hz on capable devices (like iPhone 15 Pro). When I enable a 120hz refresh target, the animation is capped at only 90hz. This looks terrible because the animation works best when doubled (30, 60, 120, 240, etc). The really bizarre thing is that when I turn on Screen Recording, my frame rate instantly jumps to 120, and everything looks perfectly smooth. My game has never looked better on iPhone! When recording is stopped, the animation drops back down to 90 fps. What in the world is going on? [displayLink setPreferredFrameRateRange:CAFrameRateRangeMake(100,240,120)]; //Min. Max, Preferred [displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; (Also, CADisableMinimumFrameDurationOnPhone is set to True in info.plist)
2
0
500
Aug ’24
Hands-off triggering of Xcode 'Pause'?
I have an app that sometimes hangs when the left mouse button is pressed, and resumes when the button is released. The code base is large with complex input handling, and I have no idea where the hang is coming from. I'm in desperate need of a stack trace and a way to inspect state when this happens, but I can't find a way to suspend the app like this. How can I trigger a Pause operation in the debugger without releasing the mouse or changing app focus? The Metal debugger has a feature to 'Capture in X seconds' - is there something similar for general debugging?
3
0
495
Dec ’22