hedgewars/hwengine.pas
changeset 9379 1bcfcaf0926e
parent 9317 a04c30940d2d
child 9464 901e363d5837
equal deleted inserted replaced
9378:2be457289e60 9379:1bcfcaf0926e
   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 {$IF 0}
   192 
   193                 //TODO: touch has become relative to the window size and has different parameters
       
   194                 SDL_FINGERMOTION:
   193                 SDL_FINGERMOTION:
   195                     onTouchMotion(event.tfinger.x, event.tfinger.y,event.tfinger.dx, event.tfinger.dy, event.tfinger.fingerId);
   194                     onTouchMotion(event.tfinger.x, event.tfinger.y, event.tfinger.dx, event.tfinger.dy, event.tfinger.fingerId);
   196 
   195 
   197                 SDL_FINGERDOWN:
   196                 SDL_FINGERDOWN:
   198                     onTouchDown(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   197                     onTouchDown(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   199 
   198 
   200                 SDL_FINGERUP:
   199                 SDL_FINGERUP:
   201                     onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   200                     onTouchUp(event.tfinger.x, event.tfinger.y, event.tfinger.fingerId);
   202 {$ENDIF}
       
   203 {$ELSE}
   201 {$ELSE}
   204                 SDL_KEYDOWN:
   202                 SDL_KEYDOWN:
   205                     if GameState = gsChat then
   203                     if GameState = gsChat then
   206                         KeyPressChat(event.key.keysym.unicode, event.key.keysym.sym)
   204                         KeyPressChat(event.key.keysym.unicode, event.key.keysym.sym)
   207                     else
   205                     else