I have not explored every type of asset that gets deleted. So sounds might get deleted or might not. Loaded shaders maybe also. You will find out fairly quickly though when you test the recovery.
gamehazer wrote: "so I need to load all my levels objects and images between each loop?"
Potentially. Basically every time you call a SYNC command, the first thing you do next is check if everything got deleted. Reload if needed.
This means you need to keep track of what needs to be loaded. Be organized.
SYNC
If RecoveryMode_ScreenValid() = 0 Then RecoveryMode_Main()
Inside the guts of the recovery code if it decides that a reload is actually to happen it calls this to actually do the reloading. You would replace this with your own loading fuction.
Game_LoadScene()
This function also periodically calls a function that draws a loading screen of some sort. It aborts the loading if the screen is lost during the reloading.
Game_DrawLoadScreen()
If RecoveryMode_ScreenValid() = 0 Then ExitFunction
If the reloading was aborted because the screen was lost again, then the code will loop back around and start the reloading again.
I also recommend wrapping SYNC in a function, and calling that function instead of SYNC directly.
Function SafeSync()
SYNC
If RecoveryMode_ScreenValid() = 0 Then RecoveryMode_Main()
EndFunction
This will ensure you are performing these checks each time SYNC is called. If a change is needed you simply change the function. Also you don't add extra duplicated lines of code all over your program.