mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-26 11:49:25 +01:00
Fix vibrator check
This commit is contained in:
parent
0f02f3472e
commit
bfef1cf301
@ -1 +1 @@
|
||||
Subproject commit 44cfcf8a62735c2d5312a1bcc1c4c633dddba1ed
|
||||
Subproject commit 60be57dafef0d3da03356e261092fdb8e54f7399
|
@ -417,8 +417,9 @@ public class XashActivity extends Activity {
|
||||
else
|
||||
handler = new JoystickHandler();
|
||||
handler.init();
|
||||
|
||||
mHasVibrator = mHasVibrator && ( handler.hasVibrator() );
|
||||
|
||||
mVibrator = ( Vibrator )getSystemService( Context.VIBRATOR_SERVICE );
|
||||
mHasVibrator = handler.hasVibrator() && (mVibrator != null);
|
||||
|
||||
mPixelFormat = mPref.getInt( "pixelformat", 0 );
|
||||
mUseVolume = mPref.getBoolean( "usevolume", false );
|
||||
@ -432,8 +433,6 @@ public class XashActivity extends Activity {
|
||||
else mImmersiveMode = new ImmersiveMode();
|
||||
|
||||
mDecorView = getWindow().getDecorView();
|
||||
|
||||
mVibrator = ( Vibrator )getSystemService( Context.VIBRATOR_SERVICE );
|
||||
|
||||
if( mPref.getBoolean( "resolution_fixed", false ) )
|
||||
{
|
||||
@ -2040,7 +2039,9 @@ class JoystickHandler_v12 extends JoystickHandler
|
||||
@Override
|
||||
public boolean hasVibrator()
|
||||
{
|
||||
return XashActivity.mVibrator.hasVibrator();
|
||||
if( XashActivity.mVibrator != null )
|
||||
return XashActivity.mVibrator.hasVibrator();
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user