From 44ee7e545f5046830e97bd2d635b0e82d3a7f587 Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 4 Sep 2019 22:06:12 -0400 Subject: [PATCH] android: settings: Fix bug where changing speed limiter will slow game down. --- src/android/app/src/main/jni/config.cpp | 2 +- src/android/app/src/main/jni/default_ini.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/android/app/src/main/jni/config.cpp b/src/android/app/src/main/jni/config.cpp index 50894a18e..4279a40c0 100644 --- a/src/android/app/src/main/jni/config.cpp +++ b/src/android/app/src/main/jni/config.cpp @@ -104,7 +104,7 @@ void Config::ReadValues() { Settings::values.vsync_enabled = sdl2_config->GetBoolean("Renderer", "vsync_enabled", false); Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true); Settings::values.frame_limit = - static_cast(sdl2_config->GetInteger("Renderer", "frame_limit", 100)); + static_cast(sdl2_config->GetReal("Renderer", "frame_limit", 1.0) * 100.0); Settings::values.render_3d = static_cast( sdl2_config->GetInteger("Renderer", "render_3d", 0)); diff --git a/src/android/app/src/main/jni/default_ini.h b/src/android/app/src/main/jni/default_ini.h index 5436da9d4..213e7a75c 100644 --- a/src/android/app/src/main/jni/default_ini.h +++ b/src/android/app/src/main/jni/default_ini.h @@ -125,8 +125,8 @@ vsync_enabled = # 0: Off, 1: On (default) use_frame_limit = -# Limits the speed of the game to run no faster than this value as a percentage of target speed -# 1 - 9999: Speed limit as a percentage of target game speed. 100 (default) +# Limits the speed of the game to run no faster than this value as a multiplier of target speed +# 0.0 - 10.0: Speed limit as a multiplier of target game speed. 1.0 (default) frame_limit = # The clear color for the renderer. What shows up on the sides of the bottom screen.