Volume buttons
This commit is contained in:
parent
cd1c47245a
commit
c52453ea1a
2 changed files with 6 additions and 1 deletions
|
@ -1 +1 @@
|
|||
Subproject commit fbb62fbaebb3b92b09eb2979e4cf34b7a53fce92
|
||||
Subproject commit a581d08683dd5c6b5695cc334acd9d5d56b23f31
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue