shithub: m8c

Download patch

ref: d9e9e18ee28a0de26ad481d6718267ca9b2d3509
parent: 7033547e44427f539fa160035ddd00854dabf485
author: laamaa <jonne.kokkonen@gmail.com>
date: Sat Sep 6 17:00:14 EDT 2025

disable integer scaling switching on iOS

--- a/src/events.c
+++ b/src/events.c
@@ -48,9 +48,6 @@
       m8_resume_processing();
     }
     break;
-  case SDL_EVENT_FINGER_DOWN:
-    input_handle_finger_down(ctx, event);
-    break;
 
   // --- Input events ---
   case SDL_EVENT_GAMEPAD_ADDED:
--- a/src/input.c
+++ b/src/input.c
@@ -368,22 +368,4 @@
   default:;
   }
   return 1;
-}
-
-// Touch screen double tap: switch between integer scaling / full screen scaling
-void input_handle_finger_down(struct app_context *ctx, const SDL_Event *event) {
-  (void)event; // Suppress unused parameter warning
-  static Uint64 last_finger_down_time = 0;
-  SDL_LogDebug(SDL_LOG_CATEGORY_INPUT, "Finger down");
-  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 > 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;
-  }
 }
\ No newline at end of file
--