Skip to content
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

Closed
dellis1972 opened this issue Dec 7, 2011 · 7 comments
Closed

resource problems after OnResume #165

dellis1972 opened this issue Dec 7, 2011 · 7 comments
Assignees

Comments

@dellis1972
Copy link
Contributor

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.

@KonajuGames
Copy link
Contributor

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.

@dellis1972
Copy link
Contributor Author

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.

@KonajuGames
Copy link
Contributor

Sure

@ghost ghost assigned KonajuGames Dec 7, 2011
@zdman2022
Copy link
Contributor

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.

@dellis1972
Copy link
Contributor Author

Im not sure anything has been done with this si feel free to investigate :-)
On Jan 17, 2012 3:57 PM, "sdancer" <
reply@reply.github.com>
wrote:

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.


Reply to this email directly or view it on GitHub:
#165 (comment)

@KonajuGames
Copy link
Contributor

Thank you for looking at that. The submitted fix appears to be fine.

@dellis1972
Copy link
Contributor Author

The fix seems to have fixed the issue, nice work sdancer :)

alxwest pushed a commit to alxwest/MonoGame that referenced this issue May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants