You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 3, 2022. It is now read-only.
Returns the current refresh rate of the specified screen. If [code]screen[/code] is [code]SCREEN_OF_MAIN_WINDOW[/code] (the default value), a screen with the main window will be used.
407
+
[b]Note:[/b] Returns [code]60.0[/code] if the DisplayServer fails to find the refresh rate for the specified screen. On HTML5, [method screen_get_refresh_rate] will always return [code]60.0[/code] as there is no way to retrieve the refresh rate on that platform.
if (monitor_info->x != monitors[p_screen].x || monitor_info->y != monitors[p_screen].y) { // If X and Y aren't the same as the monitor we're looking for, this isn't the right monitor. Continue.
1085
+
continue;
1086
+
}
1087
+
1088
+
if (monitor_info->mode != None) {
1089
+
current_mode = monitor_info->mode;
1090
+
found_active_mode = true;
1091
+
break;
1092
+
}
1093
+
}
1094
+
1095
+
if (found_active_mode) {
1096
+
for (int mode = 0; mode < screen_info->nmode; mode++) {
ERR_PRINT("An error occured while trying to get the screen refresh rate."); // We should have returned the refresh rate by now. An error must have occured.
1105
+
return SCREEN_REFRESH_RATE_FALLBACK;
1106
+
} else {
1107
+
ERR_PRINT("An error occured while trying to get the screen refresh rate.");
1108
+
return SCREEN_REFRESH_RATE_FALLBACK;
1109
+
}
1110
+
}
1111
+
ERR_PRINT("An error occured while trying to get the screen refresh rate.");
0 commit comments