hedgewars/hwengine.pas
changeset 5670 e01f0b6f1969
parent 5662 99083392cd4f
child 5672 34bb680476d4
equal deleted inserted replaced
5668:36c1d1b789b8 5670:e01f0b6f1969
   173                         prevFocusState:= cHasFocus;
   173                         prevFocusState:= cHasFocus;
   174                         cHasFocus:= event.active.gain = 1;
   174                         cHasFocus:= event.active.gain = 1;
   175                         if prevFocusState xor cHasFocus then
   175                         if prevFocusState xor cHasFocus then
   176                             onFocusStateChanged()
   176                             onFocusStateChanged()
   177                         end;
   177                         end;
       
   178                 SDL_VIDEORESIZE: begin
       
   179                     // using lower values causes widget overlap and video issues
       
   180                     if event.resize.w > 768 then cScreenWidth:= event.resize.w
       
   181                     else cScreenWidth:= 768;
       
   182                     if event.resize.h > 576 then cScreenHeight:= event.resize.h
       
   183                     else cScreenHeight:= 576;
       
   184                     ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true);
       
   185                     WriteLnToConsole('window resize');
       
   186                     end;
   178 {$ENDIF}
   187 {$ENDIF}
   179                 SDL_JOYAXISMOTION: ControllerAxisEvent(event.jaxis.which, event.jaxis.axis, event.jaxis.value);
   188                 SDL_JOYAXISMOTION: ControllerAxisEvent(event.jaxis.which, event.jaxis.axis, event.jaxis.value);
   180                 SDL_JOYHATMOTION: ControllerHatEvent(event.jhat.which, event.jhat.hat, event.jhat.value);
   189                 SDL_JOYHATMOTION: ControllerHatEvent(event.jhat.which, event.jhat.hat, event.jhat.value);
   181                 SDL_JOYBUTTONDOWN: ControllerButtonEvent(event.jbutton.which, event.jbutton.button, true);
   190                 SDL_JOYBUTTONDOWN: ControllerButtonEvent(event.jbutton.which, event.jbutton.button, true);
   182                 SDL_JOYBUTTONUP: ControllerButtonEvent(event.jbutton.which, event.jbutton.button, false);
   191                 SDL_JOYBUTTONUP: ControllerButtonEvent(event.jbutton.which, event.jbutton.button, false);