Volume keys now work hedgeroid
authorXeli
Thu, 18 Aug 2011 15:26:41 +0200
branchhedgeroid
changeset 5597 14b3cdb23c2c
parent 5595 480d451152a5
child 5599 2e4b90f33a83
Volume keys now work
project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java	Wed Aug 17 19:39:32 2011 +0200
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/SDLActivity.java	Thu Aug 18 15:26:41 2011 +0200
@@ -509,7 +509,7 @@
 
 	// Key events
 	public boolean onKey(View v, int keyCode, KeyEvent event) {
-
+                if(keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_UP) return false;
 		if (event.getAction() == KeyEvent.ACTION_DOWN) {
 			Log.v("SDL", "key down: " + keyCode);
 			if(keyCode == KeyEvent.KEYCODE_BACK){//TODO ask user to quit or not