-
Notifications
You must be signed in to change notification settings - Fork 0
BennuGD idle trick
Benjamin Hoffmann edited this page Jul 22, 2015
·
1 revision
You may have some problems with your BennuGD application and use of multi task of Android. To avoid black screen problems, application restarts or leak memory, you can use this BennuGD code :
Function idle_android();
Begin
pause_game();
while(!focus_status) frame; end
resume_game();
End
Function pause_game();
Begin
signal(ALL_PROCESS,s_freeze);
if(exists(father)) signal(father,s_wakeup); end
End
Function resume_game();
Begin
signal(ALL_PROCESS,s_wakeup);
End
Put this folowing code in your main BennuGD app loop :
if(os_id==1003 and !focus_status)
idle_android();
end