Parcourir la source

Fixed double-backspace with hardware keyboard on iOS

(cherry picked from commit b7726026f8fd9d5bf3c39a8566162db23f755e7d)
Sam Lantinga il y a 2 semaines
Parent
commit
259e4fe1a2
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/video/uikit/SDL_uikitviewcontroller.m

+ 1 - 1
src/video/uikit/SDL_uikitviewcontroller.m

@@ -581,7 +581,7 @@ static void SDLCALL SDL_HideHomeIndicatorHintChanged(void *userdata, const char
                 break;
                 break;
             }
             }
         }
         }
-        if (matchLength < committedText.length) {
+        if (matchLength < committedText.length && !SDL_HasKeyboard()) {
             size_t deleteLength = SDL_utf8strlen([[committedText substringFromIndex:matchLength] UTF8String]);
             size_t deleteLength = SDL_utf8strlen([[committedText substringFromIndex:matchLength] UTF8String]);
             while (deleteLength > 0) {
             while (deleteLength > 0) {
                 // Send distinct down and up events for each backspace action
                 // Send distinct down and up events for each backspace action