shithub: m8c

Download patch

ref: 225917e7d2ae1e853001a447db2644e61df96eb0
parent: 9e477ed2cff57c4b51a81341eab66a5023d8ecf6
author: Jonne Kokkonen <jonne.kokkonen@gmail.com>
date: Fri Apr 25 19:12:54 EDT 2025

tweak the ios double tap time range a little bit

--- a/src/input.c
+++ b/src/input.c
@@ -371,13 +371,15 @@
 void input_handle_finger_down(struct app_context *ctx, const SDL_Event *event) {
   static Uint64 last_finger_down_time = 0;
   SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "Finger down");
-  Uint64 current_time = SDL_GetTicks();
+  const Uint64 current_time = SDL_GetTicks();
   const Uint64 time_diff = current_time - last_finger_down_time;
   // Check if the screen has been double-tapped and change the scaling mode
-  if (time_diff > 50 && time_diff < 500) {
+  if (time_diff > 70 && time_diff < 500) {
     ctx->conf.integer_scaling = !ctx->conf.integer_scaling;
     renderer_fix_texture_scaling_after_window_resize(&ctx->conf);
     SDL_Log("integer scaling: %d", ctx->conf.integer_scaling);
+    last_finger_down_time = 0;
+  } else {
+    last_finger_down_time = current_time;
   }
-  last_finger_down_time = current_time;
 }
\ No newline at end of file
--