git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10869
d7cf8633-e32d-0410-b094-
e92efae38249
qboolean VID_ShowingKeyboard(void)
{
qboolean VID_ShowingKeyboard(void)
{
return SDL_iPhoneKeyboardIsShown(window);
return SDL_iPhoneKeyboardIsShown(window);
void VID_SetMouse(qboolean fullscreengrab, qboolean relative, qboolean hidecursor)
{
void VID_SetMouse(qboolean fullscreengrab, qboolean relative, qboolean hidecursor)
{
float rel[3];
qboolean button = false;
VectorClear(rel);
float rel[3];
qboolean button = false;
VectorClear(rel);
if (width > 0 && height > 0 && (key == '`' || key == K_ESCAPE || !VID_ShowingKeyboard()))
if (width > 0 && height > 0 && (key == '`' || key == K_ESCAPE || !VID_ShowingKeyboard()))
+#else
+ if (width > 0 && height > 0 && (key == '`' || key == K_ESCAPE))
+#endif
{
x *= 32768.0f / 320.0f;
y *= 32768.0f / 480.0f;
{
x *= 32768.0f / 320.0f;
y *= 32768.0f / 480.0f;
{
vec3_t move, aim, click;
static qboolean buttons[16];
{
vec3_t move, aim, click;
static qboolean buttons[16];
+ static keydest_t oldkeydest;
keydest_t keydest = (key_consoleactive & KEY_CONSOLEACTIVE_USER) ? key_console : key_dest;
multitouch[MAXFINGERS-1][0] = SDL_GetMouseState(&x, &y);
multitouch[MAXFINGERS-1][1] = x * 32768 / vid.width;
keydest_t keydest = (key_consoleactive & KEY_CONSOLEACTIVE_USER) ? key_console : key_dest;
multitouch[MAXFINGERS-1][0] = SDL_GetMouseState(&x, &y);
multitouch[MAXFINGERS-1][1] = x * 32768 / vid.width;
switch(keydest)
{
case key_console:
switch(keydest)
{
case key_console:
if (!VID_ShowingKeyboard())
{
// user entered a command, close the console now
Con_ToggleConsole_f();
}
if (!VID_ShowingKeyboard())
{
// user entered a command, close the console now
Con_ToggleConsole_f();
}
break;
case key_game:
VID_TouchscreenArea( 0, 380, 100, 100, "gfx/touch_movebutton.tga" , move, &buttons[0], K_MOUSE4);
break;
case key_game:
VID_TouchscreenArea( 0, 380, 100, 100, "gfx/touch_movebutton.tga" , move, &buttons[0], K_MOUSE4);
+#if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION == 2
+#else
case SDL_TEXTEDITING:
// unused when SETVIDEOMODE API is used
break;
case SDL_TEXTINPUT:
// this occurs with SETVIDEOMODE but we are not using it
break;
case SDL_TEXTEDITING:
// unused when SETVIDEOMODE API is used
break;
case SDL_TEXTINPUT:
// this occurs with SETVIDEOMODE but we are not using it
break;
case SDL_MOUSEMOTION:
break;
default:
case SDL_MOUSEMOTION:
break;
default: