-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better display framerate support on Android #14074
Comments
Apparently there's also an older API that could be useful, which according to https://android-developers.googleblog.com/2020/04/high-refresh-rate-rendering-on-android.html is deprecated by setFrameRate:
|
Note to self: Now that the scoped storage PR is merged and we target SDK 30, this is unblocked. |
I wonder if it'd work out to simply call -[Unknown] |
This is kinda related to this #15081? |
In a way, but it'd be kinda terrible to simply do that. If the device is 90Hz and you just "sync to host framerate" blindly, then that means in other words you're stuck at 150% speed. You'd then have to enable alternate speed at 75% to get "normal" speed but it probably would have uneven frames still. Force sync to host frame rate is basically the strategy PAL SNES games used when they were written for NTSC regions and lazily release for PAL. In that case, the games just ran 16% slower on 50Hz displays. -[Unknown] |
High-end Android 11 devices such as the Galaxy S21 family support 120hz displays. PPSSPP works fine with this, but the framerate sometimes feels slightly uneven - PSP games never run at more than 60Hz, and I suspect we sometimes get cadences like 1,2,1,3,2,2,2,2,1,3,2,2,2,2 frames (and similar).
Android 11 (SDK 30) adds a new API, Surface.setFrameRate that lets the app set a preferred framerate, and the system will try to accomodate.
We should have an option to switch down to 60Hz, for a more even framerate but probably slightly worse latency than you can get with 120Hz.
Unfortunately, using this API means that we have to target SDK 30, which starts enforcing Scoped Storage Hell. So we're essentially blocked on that. We will have to do that after August anyway though...There's also some interesting stuff here:
https://developer.android.com/games/sdk/frame-pacing
PPSSPP is certainly guilty of "buffer stuffing", and using the choreographer API we might be able to effectively reduce display latency a little.
The text was updated successfully, but these errors were encountered: