hedgewars/hwengine.pas
changeset 9311 5baf10a52f43
parent 9283 76e68c136a11
child 9317 a04c30940d2d
equal deleted inserted replaced
9309:7e8f91634f80 9311:5baf10a52f43
   187                     begin
   187                     begin
   188                         cNewScreenWidth:= max(2 * (event.window.data1 div 2), cMinScreenWidth);
   188                         cNewScreenWidth:= max(2 * (event.window.data1 div 2), cMinScreenWidth);
   189                         cNewScreenHeight:= max(2 * (event.window.data2 div 2), cMinScreenHeight);
   189                         cNewScreenHeight:= max(2 * (event.window.data2 div 2), cMinScreenHeight);
   190                         cScreenResizeDelay:= RealTicks + 500{$IFDEF IPHONEOS}div 2{$ENDIF};
   190                         cScreenResizeDelay:= RealTicks + 500{$IFDEF IPHONEOS}div 2{$ENDIF};
   191                     end;
   191                     end;
   192 
   192 {$IF 0}
       
   193                 //TODO: touch has become relative to the window size and has different parameters
   193                 SDL_FINGERMOTION:
   194                 SDL_FINGERMOTION:
   194                     onTouchMotion(event.tfinger.x, event.tfinger.y,event.tfinger.dx, event.tfinger.dy, event.tfinger.fingerId);
   195                     onTouchMotion(event.tfinger.x, event.tfinger.y,event.tfinger.dx, event.tfinger.dy, event.tfinger.fingerId);
   195 
   196 
   196                 SDL_FINGERDOWN:
   197                 SDL_FINGERDOWN:
   197                     onTouchDown(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   198                     onTouchDown(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   198 
   199 
   199                 SDL_FINGERUP:
   200                 SDL_FINGERUP:
   200                     onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   201                     onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
       
   202 {$ENDIF}
   201 {$ELSE}
   203 {$ELSE}
   202                 SDL_KEYDOWN:
   204                 SDL_KEYDOWN:
   203                     if GameState = gsChat then
   205                     if GameState = gsChat then
   204                         KeyPressChat(event.key.keysym.unicode, event.key.keysym.sym)
   206                         KeyPressChat(event.key.keysym.unicode, event.key.keysym.sym)
   205                     else
   207                     else