ANDROID Set display refresh rate based on the video->output->vertical refresh rate config value #18293
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added feature for Android that sets the display's refresh rate to a supported refresh rate mode based on the value set in the configuration vertical refresh rate variable. For example my device has a 120hz capable display but can be set to 90hz or 60hz when requested by an App.
Added a call to ra_notify_refresh_rate() when the config is loaded in configuration.c which in turn communicates with the Android app through JNI to set the refresh rate. The Android app will check supported refresh rates and requests Android OS to set the refresh rate to the closest supported refresh rate mode of the requested refresh rate.
This way you can run games at 60hz with vsync on in Android without the need to adjust the display refresh rate in Android settings itself. This way you can set refresh rates also per override config etc without ever needing to change it in Android settings itself all the time.
Main part added is ra_android_bridge.c which can also be used for any future communications from Retroarch back to the Android app