Search Issue Tracker
Fixed
Fixed in 2020.3.37f1, 2021.3.6f1, 2022.1.7f1, 2022.2.0a16
Votes
0
Found in
2019.4.37f1
2020.3.33f1
2021.3.0f1
2022.1.0b15
2022.2.0a10
Issue ID
UUM-1512
Regression
No
[Windows] The returned screen refresh rate is rounded down when calling Screen.currentResolution
How to reproduce:
1. In Windows, set the display refresh rate to 59,940 Hz (or any other non-integer value) (Right-click on the Desktop > Display Settings > Advanced Display Settings > Refresh rate)
2. Open the user-submitted project
3. Open the scene "Scene" and enter Play mode (Assets/Scene.unity)
4. In the Game view, observe the text that displays the display refresh rate
Expected result: The displayed refresh rate is 60 Hz
Actual result: The displayed refresh rate is 59 Hz
Reproducible with: 2019.4.37f1, 2020.3.33f1, 2021.2.19f1, 2021.3.0f1, 2022.1.0b15, 2022.2.0a10
Notes:
1. Reproducible only on Windows
2. Reproducible in the Editor and the Player
3. Certain refresh rates are rounded up instead of down (59.883 Hz is displayed as 60 Hz)
Comments (2)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Manual reference page for Grid Selection is missing
- Awaitable.NextFrameAsync causes GC Alloc 0.7 KB when using CancellationToken
- Prefab "Overrides" list item popups are overridden when navigating with keyboard arrow keys
- Alpha Tolerance setting does not affect generated outlines when generating Custom Physics Shape in the Sprite Editor
- The information/help message section misses a margin in the "Profiler" window
Tautvydas-Zilys
Jul 14, 2022 00:09
@atomicjoe, I created a forum thread here where we can discuss it: https://forum.unity.com/threads/refresh-rate-rounding-on-windows.1308462/
atomicjoe
Jul 08, 2022 11:05
Warning!: Returning a value of 60 for both 59,940Hz and 60Hz WILL lead to issues in the long run!
This shouldn't be "fixed" by rounding UP instead of down: 59,940 Hz and 60Hz are different refresh rates and should be differentiated.
Failing to account for the difference will lead to glitches specially with video, so either keep it rounded down as 59hz and 60hz if you have to use an integer for this value, or just use a float and return 59,940Hz correctly.
Otherwise, they will be problems when the user has to choose between the same resolution but one in 60hz and the other in 59,940hz and both return 60hz!
THIS IS IMPORTANT FOR VIDEO!