diff --git a/MonoGame.Framework/Platform/Android/AndroidGameWindow.cs b/MonoGame.Framework/Platform/Android/AndroidGameWindow.cs index 431f70ce281..8d5079198f7 100644 --- a/MonoGame.Framework/Platform/Android/AndroidGameWindow.cs +++ b/MonoGame.Framework/Platform/Android/AndroidGameWindow.cs @@ -244,11 +244,12 @@ internal void ChangeClientBounds(Rectangle bounds) { _clientBounds = bounds; OnClientSizeChanged(); + + Android.Util.Log.Debug("Kni", "GameWindow.ChangeClientBounds: newClientBounds=" + this.ClientBounds.Width + "," + this.ClientBounds.Height); + TouchPanel.DisplayWidth = this.ClientBounds.Width; + TouchPanel.DisplayHeight = this.ClientBounds.Height; } - Android.Util.Log.Debug("Kni", "GameWindow.ChangeClientBounds: newClientBounds=" + this.ClientBounds.Width + "," + this.ClientBounds.Height); - TouchPanel.DisplayWidth = this.ClientBounds.Width; - TouchPanel.DisplayHeight = this.ClientBounds.Height; } public override bool AllowUserResizing diff --git a/MonoGame.Framework/Platform/Android/AndroidSurfaceView.cs b/MonoGame.Framework/Platform/Android/AndroidSurfaceView.cs index 0058b80e82b..daa50236e75 100644 --- a/MonoGame.Framework/Platform/Android/AndroidSurfaceView.cs +++ b/MonoGame.Framework/Platform/Android/AndroidSurfaceView.cs @@ -289,10 +289,9 @@ void ProcessStateResumed() { ConcreteGraphicsDevice gd = (ConcreteGraphicsDevice)((IPlatformGraphicsDevice)gdm.GraphicsDevice).Strategy; gd.Android_UpdateBackBufferBounds(this.Width, this.Height); - - _gameWindow.ChangeClientBounds(new Rectangle(0, 0, this.Width, this.Height)); } } + _gameWindow.ChangeClientBounds(new Rectangle(0, 0, this.Width, this.Height)); } if (_isGLContextLost) @@ -322,9 +321,9 @@ void ProcessStateResumed() ConcreteGraphicsDevice gd = (ConcreteGraphicsDevice)((IPlatformGraphicsDevice)gdm.GraphicsDevice).Strategy; gd.Android_UpdateBackBufferBounds(this.Width, this.Height); - _gameWindow.ChangeClientBounds(new Rectangle(0, 0, this.Width, this.Height)); } } + _gameWindow.ChangeClientBounds(new Rectangle(0, 0, this.Width, this.Height)); } // check if app wants to exit diff --git a/MonoGame.Framework/Platform/Cardboard/AndroidGameWindow.cs b/MonoGame.Framework/Platform/Cardboard/AndroidGameWindow.cs index 50a0c42267e..a284ed40e1a 100644 --- a/MonoGame.Framework/Platform/Cardboard/AndroidGameWindow.cs +++ b/MonoGame.Framework/Platform/Cardboard/AndroidGameWindow.cs @@ -244,11 +244,11 @@ internal void ChangeClientBounds(Rectangle bounds) { _clientBounds = bounds; OnClientSizeChanged(); - } - Android.Util.Log.Debug("Kni", "GameWindow.ChangeClientBounds: newClientBounds=" + this.ClientBounds.Width + "," + this.ClientBounds.Height); - TouchPanel.DisplayWidth = this.ClientBounds.Width; - TouchPanel.DisplayHeight = this.ClientBounds.Height; + Android.Util.Log.Debug("Kni", "GameWindow.ChangeClientBounds: newClientBounds=" + this.ClientBounds.Width + "," + this.ClientBounds.Height); + TouchPanel.DisplayWidth = this.ClientBounds.Width; + TouchPanel.DisplayHeight = this.ClientBounds.Height; + } } public override bool AllowUserResizing diff --git a/MonoGame.Framework/Platform/Cardboard/AndroidSurfaceView.cs b/MonoGame.Framework/Platform/Cardboard/AndroidSurfaceView.cs index f14e4439178..16fd29b5a53 100644 --- a/MonoGame.Framework/Platform/Cardboard/AndroidSurfaceView.cs +++ b/MonoGame.Framework/Platform/Cardboard/AndroidSurfaceView.cs @@ -238,10 +238,9 @@ void ProcessStateResumed() { ConcreteGraphicsDevice gd = (ConcreteGraphicsDevice)((IPlatformGraphicsDevice)gdm.GraphicsDevice).Strategy; gd.Android_UpdateBackBufferBounds(this.Width, this.Height); - - _gameWindow.ChangeClientBounds(new Rectangle(0, 0, this.Width, this.Height)); } } + _gameWindow.ChangeClientBounds(new Rectangle(0, 0, this.Width, this.Height)); } if (_isGLContextLost) @@ -275,9 +274,9 @@ void ProcessStateResumed() ConcreteGraphicsDevice gd = (ConcreteGraphicsDevice)((IPlatformGraphicsDevice)gdm.GraphicsDevice).Strategy; gd.Android_UpdateBackBufferBounds(this.Width, this.Height); - _gameWindow.ChangeClientBounds(new Rectangle(0, 0, this.Width, this.Height)); } } + _gameWindow.ChangeClientBounds(new Rectangle(0, 0, this.Width, this.Height)); } // check if app wants to exit