diff --git a/flixel/FlxGame.hx b/flixel/FlxGame.hx index fc8f6c71ec..94dc171d17 100644 --- a/flixel/FlxGame.hx +++ b/flixel/FlxGame.hx @@ -359,15 +359,13 @@ class FlxGame extends Sprite #if (desktop && openfl <= "4.0.0") stage.addEventListener(FocusEvent.FOCUS_OUT, onFocusLost); stage.addEventListener(FocusEvent.FOCUS_IN, onFocus); - #else - #if sys + #elseif (sys && openfl >= "9.3.0") stage.nativeWindow.addEventListener(Event.DEACTIVATE, onFocusLost); stage.nativeWindow.addEventListener(Event.ACTIVATE, onFocus); #else stage.addEventListener(Event.DEACTIVATE, onFocusLost); stage.addEventListener(Event.ACTIVATE, onFocus); #end - #end // Instantiate the initial state resetGame();