From 767b96bd12b7a32c88b4f1cc85ede8bc3cf84919 Mon Sep 17 00:00:00 2001 From: Yousef Khadadeh Date: Sat, 11 Apr 2026 16:40:53 +0300 Subject: [PATCH] Removed debug FPS limit --- src/GlobalConfig.cpp | 2 -- src/GlobalConfig.hpp | 1 - src/MainProgram.cpp | 3 --- src/MainProgram.hpp | 2 -- src/Toolbar.cpp | 3 --- 5 files changed, 11 deletions(-) diff --git a/src/GlobalConfig.cpp b/src/GlobalConfig.cpp index 8b97c24..da90d04 100644 --- a/src/GlobalConfig.cpp +++ b/src/GlobalConfig.cpp @@ -51,7 +51,6 @@ nlohmann::json GlobalConfig::get_config_json(const InputManager& input) const { json debugJson; debugJson["showPerformance"] = showPerformance; - debugJson["fpsLimit"] = fpsLimit; debugJson["jumpTransitionEasing"] = jumpTransitionEasing; debugJson["imageLoadMaxThreads"] = ImageResourceDisplay::IMAGE_LOAD_THREAD_COUNT_MAX; debugJson["cacheNodeResolution"] = DrawingProgramCache::CACHE_NODE_RESOLUTION; @@ -118,7 +117,6 @@ void GlobalConfig::set_config_json(InputManager& input, const nlohmann::json& j, try{j.at("tablet").at("zoomWhilePenDownAndButtonHeld").get_to(tabletOptions.zoomWhilePenDownAndButtonHeld);} catch(...) {} try{j.at("debug").at("showPerformance").get_to(showPerformance);} catch(...) {} - try{j.at("debug").at("fpsLimit").get_to(fpsLimit);} catch(...) {} try{j.at("debug").at("jumpTransitionEasing").get_to(jumpTransitionEasing);} catch(...) {} try{j.at("debug").at("imageLoadMaxThreads").get_to(ImageResourceDisplay::IMAGE_LOAD_THREAD_COUNT_MAX);} catch(...) {} try{j.at("debug").at("cacheNodeResolution").get_to(DrawingProgramCache::CACHE_NODE_RESOLUTION);} catch(...) {} diff --git a/src/GlobalConfig.hpp b/src/GlobalConfig.hpp index 5b45350..ec3e93d 100644 --- a/src/GlobalConfig.hpp +++ b/src/GlobalConfig.hpp @@ -28,7 +28,6 @@ class GlobalConfig { } tabletOptions; Vector3f defaultCanvasBackgroundColor = DEFAULT_CANVAS_BACKGROUND_COLOR; - float fpsLimit = 10000.0f; nlohmann::json get_config_json(const InputManager& input) const; void set_config_json(InputManager& input, const nlohmann::json& j, VersionNumber version); diff --git a/src/MainProgram.cpp b/src/MainProgram.cpp index 8707bef..1524bdb 100755 --- a/src/MainProgram.cpp +++ b/src/MainProgram.cpp @@ -67,9 +67,6 @@ MainProgram::MainProgram(): } void MainProgram::update() { - while(std::chrono::duration_cast>(std::chrono::steady_clock::now() - lastFrameTime).count() < 1.0 / conf.fpsLimit); - lastFrameTime = std::chrono::steady_clock::now(); - deltaTime.update_time_since(); deltaTime.update_time_point(); diff --git a/src/MainProgram.hpp b/src/MainProgram.hpp index c5393e9..8fc0ac8 100644 --- a/src/MainProgram.hpp +++ b/src/MainProgram.hpp @@ -31,8 +31,6 @@ class MainProgram { InputManager input; - std::chrono::steady_clock::time_point lastFrameTime = std::chrono::steady_clock::now(); - Vector3f userColor; struct Window { diff --git a/src/Toolbar.cpp b/src/Toolbar.cpp index e29c00a..db7bb82 100644 --- a/src/Toolbar.cpp +++ b/src/Toolbar.cpp @@ -1945,9 +1945,6 @@ void Toolbar::general_settings_inner_gui() { general_scroll_area("debug settings menu", [&] { checkbox_boolean_field(gui, "show performance metrics", "Show metrics", &showPerformance); input_scalars_field(gui, "jump transition easing", "Jump easing", &main.conf.jumpTransitionEasing, 4, -10.0f, 10.0f, { .decimalPrecision = 2 }); - #ifndef __EMSCRIPTEN__ - input_scalar_field(gui, "fps cap slider", "FPS cap", &main.conf.fpsLimit, 3.0f, 10000.0f); - #endif input_scalar_field(gui, "image load max threads", "Maximum image loading threads", &ImageResourceDisplay::IMAGE_LOAD_THREAD_COUNT_MAX, 1, 10000); text_label_light(gui, "Cache related settings"); input_scalar_field(gui, "cache node resolution", "Cache node resolution", &DrawingProgramCache::CACHE_NODE_RESOLUTION, 256, 8192);