mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-25 11:19:59 +01:00
Make force-quit after engine wait timeout
This commit is contained in:
parent
06359502e1
commit
1018169842
@ -47,8 +47,12 @@ public class XashService extends Service {
|
||||
public static class exitButtonListener extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
XashActivity.mEngineReady = false;
|
||||
XashActivity.nativeUnPause();
|
||||
XashActivity.nativeOnDestroy();
|
||||
if( XashActivity.mSurface != null )
|
||||
XashActivity.mSurface.engineThreadJoin();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,11 +108,14 @@ public class XashService extends Service {
|
||||
@Override
|
||||
public void onTaskRemoved(Intent rootIntent) {
|
||||
Log.e("XashService", "OnTaskRemoved");
|
||||
if( XashActivity.mEngineReady )
|
||||
//if( XashActivity.mEngineReady )
|
||||
{
|
||||
XashActivity.mEngineReady = false;
|
||||
XashActivity.nativeUnPause();
|
||||
XashActivity.nativeOnDestroy();
|
||||
if( XashActivity.mSurface != null )
|
||||
XashActivity.mSurface.engineThreadJoin();
|
||||
System.exit(0);
|
||||
}
|
||||
stopSelf();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user