178 cHasFocus:= event.active.gain = 1; |
178 cHasFocus:= event.active.gain = 1; |
179 if prevFocusState xor cHasFocus then |
179 if prevFocusState xor cHasFocus then |
180 onFocusStateChanged() |
180 onFocusStateChanged() |
181 end; |
181 end; |
182 SDL_VIDEORESIZE: begin |
182 SDL_VIDEORESIZE: begin |
183 // using lower values causes widget overlap and video issues |
183 // using lower values than cMinScreenWidth or cMinScreenHeight causes widget overlap and off-screen widget parts |
184 cNewScreenWidth:= max(event.resize.w, cMinScreenWidth); |
184 // Change by sheepluva: |
185 cNewScreenHeight:= max(event.resize.h, cMinScreenHeight); |
185 // Let's only use even numbers for custom width/height since I ran into scaling issues with odd width values. |
|
186 // Maybe just fixes the symptom not the actual cause(?), I'm too tired to find out :P |
|
187 cNewScreenWidth:= max(2 * (event.resize.w div 2), cMinScreenWidth); |
|
188 cNewScreenHeight:= max(2 * (event.resize.h div 2), cMinScreenHeight); |
186 cScreenResizeDelay:= RealTicks+500; |
189 cScreenResizeDelay:= RealTicks+500; |
187 end; |
190 end; |
188 {$ENDIF} |
191 {$ENDIF} |
189 SDL_JOYAXISMOTION: ControllerAxisEvent(event.jaxis.which, event.jaxis.axis, event.jaxis.value); |
192 SDL_JOYAXISMOTION: ControllerAxisEvent(event.jaxis.which, event.jaxis.axis, event.jaxis.value); |
190 SDL_JOYHATMOTION: ControllerHatEvent(event.jhat.which, event.jhat.hat, event.jhat.value); |
193 SDL_JOYHATMOTION: ControllerHatEvent(event.jhat.which, event.jhat.hat, event.jhat.value); |