Emscripten: Make default FPS limit 60

This commit is contained in:
Tamás Bálint Misius 2023-08-31 08:24:00 +02:00
parent 3388094110
commit 2539c3eff5
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2
3 changed files with 1 additions and 12 deletions

View File

@ -17,7 +17,6 @@ constexpr bool IGNORE_UPDATES = @IGNORE_UPDATES@;
constexpr bool ENFORCE_HTTPS = @ENFORCE_HTTPS@; constexpr bool ENFORCE_HTTPS = @ENFORCE_HTTPS@;
constexpr bool SECURE_CIPHERS_ONLY = @SECURE_CIPHERS_ONLY@; constexpr bool SECURE_CIPHERS_ONLY = @SECURE_CIPHERS_ONLY@;
constexpr bool FFTW_PLAN_MEASURE = @FFTW_PLAN_MEASURE@; constexpr bool FFTW_PLAN_MEASURE = @FFTW_PLAN_MEASURE@;
constexpr bool DEFAULT_VSYNC = @DEFAULT_VSYNC@;
constexpr bool ALLOW_QUIT = @ALLOW_QUIT@; constexpr bool ALLOW_QUIT = @ALLOW_QUIT@;
constexpr bool ALLOW_WINDOW_FRAME_OPS = @ALLOW_WINDOW_FRAME_OPS@; constexpr bool ALLOW_WINDOW_FRAME_OPS = @ALLOW_WINDOW_FRAME_OPS@;
constexpr bool ALLOW_DATA_FOLDER = @ALLOW_DATA_FOLDER@; constexpr bool ALLOW_DATA_FOLDER = @ALLOW_DATA_FOLDER@;

View File

@ -27,15 +27,7 @@ Engine::Engine():
mousexp_(0), mousexp_(0),
mouseyp_(0) mouseyp_(0)
{ {
SetFpsLimit(fpsLimit); // populate dt with whatever that makes any sort of sense SetFpsLimit(FpsLimitExplicit{ 60.0f });
if constexpr (DEFAULT_VSYNC)
{
SetFpsLimit(FpsLimitVsync{});
}
else
{
SetFpsLimit(FpsLimitExplicit{ 60.0f });
}
} }
Engine::~Engine() Engine::~Engine()

View File

@ -61,12 +61,10 @@ if host_platform == 'emscripten'
powder_files += files( powder_files += files(
'PowderToySDLEmscripten.cpp', 'PowderToySDLEmscripten.cpp',
) )
conf_data.set('DEFAULT_VSYNC', 'true')
else else
powder_files += files( powder_files += files(
'PowderToySDLCommon.cpp', 'PowderToySDLCommon.cpp',
) )
conf_data.set('DEFAULT_VSYNC', 'false')
endif endif
if is_x86 if is_x86
powder_files += files('X86KillDenormals.cpp') powder_files += files('X86KillDenormals.cpp')