src/video/SDL_video.c
changeset 6670 d4883f657288
parent 6662 698c2e533a7e
child 6671 394e25751ef5
     1.1 --- a/src/video/SDL_video.c	Thu Nov 08 21:53:57 2012 -0800
     1.2 +++ b/src/video/SDL_video.c	Fri Nov 09 02:18:27 2012 -0800
     1.3 @@ -522,6 +522,17 @@
     1.4          _this->DestroyWindowFramebuffer = SDL_DestroyWindowTexture;
     1.5      }
     1.6  
     1.7 +    /* If we don't use a screen keyboard, turn on text input by default,
     1.8 +       otherwise programs that expect to get text events without enabling
     1.9 +       UNICODE input won't get any events.
    1.10 +
    1.11 +       Actually, come to think of it, you needed to call SDL_EnableUNICODE(1)
    1.12 +       in SDL 1.2 before you got text input events.  Hmm...
    1.13 +     */
    1.14 +    if (!SDL_HasScreenKeyboardSupport()) {
    1.15 +        SDL_StartTextInput();
    1.16 +    }
    1.17 +
    1.18      /* We're ready to go! */
    1.19      return 0;
    1.20  }
    1.21 @@ -2831,7 +2842,12 @@
    1.22      if (_this && _this->SDL_HasScreenKeyboardSupport) {
    1.23          return _this->SDL_HasScreenKeyboardSupport(_this);
    1.24      }
    1.25 +/* FIXME: The event system queries this before we initialize our video driver */
    1.26 +#if __IPHONEOS__ || __ANDROID__
    1.27 +    return SDL_TRUE;
    1.28 +#else
    1.29      return SDL_FALSE;
    1.30 +#endif
    1.31  }
    1.32  
    1.33  SDL_bool