GNOME Bugzilla – Bug 769938
Handle failures when resuming a game
Last modified: 2016-08-16 16:19:45 UTC
.
Created attachment 333366 [details] [review] retro: Don't translate a message that won't be user-facing
Created attachment 333367 [details] [review] retro: Don't try to load the state if its size is wrong The core is supposed to return serialized data of a certain, expected size. Unfortunately, they often don't. When that happens, we probably shouldn't try to load the serialized state, as it is potentially bad. Unfortunately, it might also be correct. If we don't load such serialized data and it was correct, the player will lose the state of their game, which is pretty bad. However if we try loading such serialized data and it was bad, then the core will just completely freeze the whole application, with no way for the user to even close it. The second option seems even worse, so with this commit we throw an error when the size wasn't the expected one.
Created attachment 333368 [details] [review] ui: Handle failures when resuming Sometimes, resuming the saved state of a game won't work, because the snapshot will be corrupted. When that happens, we now inform the user that something went wrong, and offer them to restart the game from the main menu.
Attachment 333366 [details] pushed as f22cd0f - retro: Don't translate a message that won't be user-facing Attachment 333367 [details] pushed as d27b382 - retro: Don't try to load the state if its size is wrong Attachment 333368 [details] pushed as 77ee9bd - ui: Handle failures when resuming