Skip to content
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

Android: Filter Device To Force High Frame Rate #880

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

brianabdl
Copy link
Contributor

In a device like mine (Xiaomi), applying force HFR is resulting in a drop fps.
Filtering the device brand using AndroidDeviceInfo.brand helps to fix this bug.

Note: My current Display Frame Rate is set to 90Hz

Before After

@brianabdl brianabdl changed the title fix(android): filter device to force HFR Android: Filter Device To Force High Frame Rate Nov 15, 2023
@KRTirtho
Copy link
Owner

I'm not sure why but I also use a realme narzo 50. Which has 120hz refresh-rate and it's buttery smooth

@KRTirtho
Copy link
Owner

Maybe instead of filtering devices, we let the user choose if they want this or not?

@KRTirtho
Copy link
Owner

KRTirtho commented Nov 16, 2023

We can enable high refresh rate by default but we'll check if the current refresh rate is >=60 or not. If it's below 60 we'll ask the user to disable it with a dialog in the settings with toggle

@brianabdl
Copy link
Contributor Author

That's a good idea, although it's not every brand device that uses the buggy OS has this bug

@brianabdl
Copy link
Contributor Author

brianabdl commented Nov 16, 2023

Or maybe, you could detect the after-changes fps with the target set fps,
if after changing to target FPS, the current fps is lower than the target set fps, revert using the old fps

@KRTirtho
Copy link
Owner

Or maybe, you could detect the after-changes fps with the target set fps, if after changing to target FPS, the current fps is lower than the target set fps, revert using the old fps

Yeah, that is what I was proposing at first. But we'll let the user know and let them decide if they want to change or not.

@brianabdl
Copy link
Contributor Author

Would the user get too many prompts at the first run (with the battery optimization warning)?

I think it would be the best experience to do the failsafe method like you suggesting without giving them warning since many other apps out there don't do this warning just for the FPS thing

@KRTirtho
Copy link
Owner

Hmm, that's also true. Yeah lets go that direction

@brianabdl
Copy link
Contributor Author

Hey, just wanna catch up, is there any improvement that I can make for this PR?

@KRTirtho KRTirtho merged commit 6e41b10 into KRTirtho:dev Apr 12, 2024
@brianabdl brianabdl deleted the android-force-hfr branch April 12, 2024 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants