mono/MonoGame — pull request #591 by Aranda (2012-07-16 17:44:20+00:00)
Title: Develop3d - Android: Fix dynamic orientation and merge in lock screen changes from develop branch

Initially I intended to just make the Orientation sample function as it does in develop branch, however this was harder than expected and I ended up reworking the way orientation changes are handled. I also included Dean's recent ScreenReceiver changes.

Notes:

- GraphicsDeviceManager.ApplyChanges() can now do stuff. In particular it updates presentation parameters and triggers orientation changes if the current orientation becomes unsupported.
- GraphicsDeviceManager.ResetClientBounds() has been taken from develop and modified. It correctly updates the Viewport now. It attempts to ensure you are always working with the preferred aspect ratio, but it does not modify the buffer size. It's debatable how useful preserving the aspect ratio across orientation changes is. Particularly so when the aspect ratio is implied by the preferred buffer W & H and some devices with only soft keys on the task bar change aspect on orientation change.
- AndroidGameWindow now implements ISurfaceHolderCallback.SurfaceChanged as a means of delaying the response to orientation change until it's fully propogated.
- Cleaned up some code in Game.cs. I know some of this not Android specific, but I believe non-Android actual functionality is not affected (remember ResetClientBounds() used to be empty on develop3d).