mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-09 21:52:05 +08:00
Volume buttons
This commit is contained in:
+1
-1
Submodule jni/src/Xash3D/xash3d updated: fbb62fbaeb...a581d08683
@@ -40,6 +40,7 @@ public class XashActivity extends Activity {
|
||||
|
||||
// Preferences
|
||||
public static SharedPreferences mPref = null;
|
||||
private static boolean mUseVolume;
|
||||
|
||||
// Audio
|
||||
private static Thread mAudioThread;
|
||||
@@ -125,6 +126,7 @@ public class XashActivity extends Activity {
|
||||
InstallReceiver.extractPAK(this, false);
|
||||
|
||||
mPixelFormat = mPref.getInt("pixelformat", 0);
|
||||
mUseVolume = mPref.getBoolean("usevolume", false);
|
||||
AndroidBug5497Workaround.assistActivity(this);
|
||||
}
|
||||
|
||||
@@ -211,6 +213,9 @@ public class XashActivity extends Activity {
|
||||
public static boolean handleKey( int keyCode, KeyEvent event )
|
||||
{
|
||||
|
||||
if ( mUseVolume && ( keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ||
|
||||
keyCode == KeyEvent.KEYCODE_VOLUME_UP ) )
|
||||
return false;
|
||||
//Log.d( TAG, "Keycode " + keyCode );
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user