mirror of https://github.com/encounter/SDL.git
Always release devices in onPause in case we're going to be force stopped, and for consistency with interacting with other activities that might use the controller
This commit is contained in:
parent
c9f672fde4
commit
ce7c51a9cc
|
@ -283,10 +283,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mHIDDeviceManager != null) {
|
|
||||||
mHIDDeviceManager.setFrozen(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
SDLActivity.handleNativeState();
|
SDLActivity.handleNativeState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,10 +294,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mHIDDeviceManager != null) {
|
|
||||||
mHIDDeviceManager.setFrozen(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
SDLActivity.handleNativeState();
|
SDLActivity.handleNativeState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,6 +302,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
Log.v(TAG, "onPause()");
|
Log.v(TAG, "onPause()");
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
|
||||||
|
if (mHIDDeviceManager != null) {
|
||||||
|
mHIDDeviceManager.setFrozen(true);
|
||||||
|
}
|
||||||
if (!mHasMultiWindow) {
|
if (!mHasMultiWindow) {
|
||||||
pauseNativeThread();
|
pauseNativeThread();
|
||||||
}
|
}
|
||||||
|
@ -319,6 +315,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
Log.v(TAG, "onResume()");
|
Log.v(TAG, "onResume()");
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
|
if (mHIDDeviceManager != null) {
|
||||||
|
mHIDDeviceManager.setFrozen(false);
|
||||||
|
}
|
||||||
if (!mHasMultiWindow) {
|
if (!mHasMultiWindow) {
|
||||||
resumeNativeThread();
|
resumeNativeThread();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue