feat: updated godot version

This commit is contained in:
Sara Gerretsen 2026-04-04 19:38:56 +02:00
parent 0c508b0831
commit 42b028dbb5
4694 changed files with 236470 additions and 401376 deletions

View file

@ -33,13 +33,6 @@
#include "core/os/os.h"
#include "servers/display/display_server.h"
// Uncomment this define to get more debugging logs for the delta smoothing.
// #define GODOT_DEBUG_DELTA_SMOOTHER
#ifdef GODOT_DEBUG_DELTA_SMOOTHER
#include "core/string/print_string.h"
#include "core/string/string.h"
#endif
void MainFrameTime::clamp_process_step(double min_process_step, double max_process_step) {
if (process_step < min_process_step) {
process_step = min_process_step;
@ -50,20 +43,6 @@ void MainFrameTime::clamp_process_step(double min_process_step, double max_proce
/////////////////////////////////
void MainTimerSync::DeltaSmoother::made_new_estimate() {
_hits_above_estimated = 0;
_hits_at_estimated = 0;
_hits_below_estimated = 0;
_hits_one_above_estimated = 0;
_hits_one_below_estimated = 0;
_estimate_complete = false;
#ifdef GODOT_DEBUG_DELTA_SMOOTHER
print_line("estimated fps " + itos(_estimated_fps));
#endif
}
void MainTimerSync::DeltaSmoother::update_refresh_rate_estimator(int64_t p_delta) {
// the calling code should prevent 0 or negative values of delta
// (preventing divide by zero)
@ -233,6 +212,8 @@ bool MainTimerSync::DeltaSmoother::fps_allows_smoothing(int64_t p_delta) {
double fps = 1000000.0 / time_passed;
double ratio = fps / (double)_estimated_fps;
//print_line("ratio : " + String(Variant(ratio)));
if ((ratio > 0.95) && (ratio < 1.05)) {
_measurement_allows_smoothing = true;
} else {
@ -262,8 +243,8 @@ int64_t MainTimerSync::DeltaSmoother::smooth_delta(int64_t p_delta) {
}
// only attempt smoothing if vsync is selected
DisplayServerEnums::VSyncMode vsync_mode = DisplayServer::get_singleton()->window_get_vsync_mode(DisplayServerEnums::MAIN_WINDOW_ID);
if (vsync_mode != DisplayServerEnums::VSYNC_ENABLED) {
DisplayServer::VSyncMode vsync_mode = DisplayServer::get_singleton()->window_get_vsync_mode(DisplayServer::MAIN_WINDOW_ID);
if (vsync_mode != DisplayServer::VSYNC_ENABLED) {
return p_delta;
}
@ -307,6 +288,7 @@ int64_t MainTimerSync::DeltaSmoother::smooth_delta(int64_t p_delta) {
units = MAX(units, 1);
_leftover_time -= units * _vsync_delta;
// print_line("units " + itos(units) + ", leftover " + itos(_leftover_time/1000) + " ms");
return units * _vsync_delta;
}