fix how OnUnload and OnLostContext game app callbacks are invoked
The game app's callbacks should fire before the framework object's equivalent callbacks are called (since most of those will forcefully free resources that the game app should be given the chance to deal with itself first)
This commit is contained in:
parent
52a262659f
commit
17f41fe218
|
@ -107,17 +107,17 @@ namespace Blarg.GameFramework
|
|||
protected void OnUnload()
|
||||
{
|
||||
Logger.Info(LOG_TAG, "OnUnload");
|
||||
GameApp.OnUnload();
|
||||
if (GraphicsDevice != null)
|
||||
GraphicsDevice.OnUnload();
|
||||
GameApp.OnUnload();
|
||||
}
|
||||
|
||||
protected void OnLostContext()
|
||||
{
|
||||
Logger.Info(LOG_TAG, "OnLostContext");
|
||||
GameApp.OnLostContext();
|
||||
if (GraphicsDevice != null)
|
||||
GraphicsDevice.OnLostContext();
|
||||
GameApp.OnLostContext();
|
||||
}
|
||||
|
||||
protected void OnNewContext()
|
||||
|
|
Reference in a new issue