Skip to content

Commit

Permalink
call ChangeClientBounds()
Browse files Browse the repository at this point in the history
  • Loading branch information
nkast committed May 21, 2024
1 parent f25510d commit c931355
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions MonoGame.Framework/Platform/Android/AndroidSurfaceView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,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));
}

// OGL.InitExtensions() must be called while we have a gl context.
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions MonoGame.Framework/Platform/Cardboard/AndroidSurfaceView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,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));
}

// OGL.InitExtensions() must be called while we have a gl context.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c931355

Please sign in to comment.