mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Check for valid fields calling EnumDisplaySettings
This commit is contained in:
parent
e37be42a6c
commit
14f45e3b44
@ -289,7 +289,11 @@ static int ScreenRefreshRateHz() {
|
||||
if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &lpDevMode) == 0) {
|
||||
return 60; // default value
|
||||
} else {
|
||||
return lpDevMode.dmDisplayFrequency > 15 ? lpDevMode.dmDisplayFrequency : 60;
|
||||
if (lpDevMode.dmFields & DM_DISPLAYFREQUENCY) {
|
||||
return lpDevMode.dmDisplayFrequency > 15 ? lpDevMode.dmDisplayFrequency : 60;
|
||||
} else {
|
||||
return 60;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user