-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resource problems after OnResume #165
Comments
Sounds similar to device reset issues we used to deal with on Windows prior to DirectX10. We may have to reload textures and other affected assets on resume. This should be trivial for assets loaded through the ContentManager as we have a list of them and their asset names. Assets created by the developer outside of the ContentManager will need to be manually reloaded or recreated by the developer. This is what the GraphicsDevice.DeviceReset event is intended for. ContentManager could attach an event handler to this event so that assets loaded by that ContentManager are automatically reloaded as required. Alternatively, each Texture2D and other affected assets attach their own event handler when they are created so the objects reload themselves. |
Sly, any chance you could take this issue on? I'm going to be looking at the various Orientation issues we had at the moment and a Texture Rectangle issue as well. |
Sure |
What's the status on this? I'm about to tackle device reset for the FRB engine. I was going to reload everything in our ContentManager. The problem with doing it through the engine is it should be done asynchronously otherwise it will freeze the game. |
Im not sure anything has been done with this si feel free to investigate :-)
|
Thank you for looking at that. The submitted fix appears to be fine. |
The fix seems to have fixed the issue, nice work sdancer :) |
http://monogame.codeplex.com/discussions/281277
When - in the android app lifecycle - you hit an onresume after an onstop because another app came forward I am seeing all the textures that were previously loaded being corrupt but any textures loaded from that point are fine.
The text was updated successfully, but these errors were encountered: