Fixed right mouse button acting as Back key on Samsung devices with USB/Bluetooth mouse, bumped minimum Android version to Gingerbread.
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
/>
|
||||
</application>
|
||||
|
||||
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="21"/>
|
||||
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="21"/>
|
||||
<!-- ==INTERNET== --> <uses-permission android:name="android.permission.INTERNET"></uses-permission>
|
||||
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
|
||||
<!-- ==EXTERNAL_STORAGE== --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
|
||||
|
||||
@@ -85,6 +85,7 @@ import android.app.ProgressDialog;
|
||||
import android.app.KeyguardManager;
|
||||
import android.view.ViewTreeObserver;
|
||||
import android.graphics.Rect;
|
||||
import android.view.InputDevice;
|
||||
|
||||
|
||||
public class MainActivity extends Activity
|
||||
@@ -764,7 +765,13 @@ public class MainActivity extends Activity
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, final KeyEvent event)
|
||||
{
|
||||
if(_screenKeyboard != null)
|
||||
if( keyCode == KeyEvent.KEYCODE_BACK && event.getSource() == InputDevice.SOURCE_MOUSE )
|
||||
{
|
||||
// Stupid Samsung remaps right mouse button to BACK key
|
||||
DemoGLSurfaceView.nativeMouseButtonsPressed(2, 1);
|
||||
return true;
|
||||
}
|
||||
if( _screenKeyboard != null )
|
||||
_screenKeyboard.onKeyDown(keyCode, event);
|
||||
else
|
||||
if( mGLView != null )
|
||||
@@ -786,7 +793,13 @@ public class MainActivity extends Activity
|
||||
@Override
|
||||
public boolean onKeyUp(int keyCode, final KeyEvent event)
|
||||
{
|
||||
if(_screenKeyboard != null)
|
||||
if( keyCode == KeyEvent.KEYCODE_BACK && event.getSource() == InputDevice.SOURCE_MOUSE )
|
||||
{
|
||||
// Stupid Samsung remaps right mouse button to BACK key
|
||||
DemoGLSurfaceView.nativeMouseButtonsPressed(2, 0);
|
||||
return true;
|
||||
}
|
||||
if( _screenKeyboard != null )
|
||||
_screenKeyboard.onKeyUp(keyCode, event);
|
||||
else
|
||||
if( mGLView != null )
|
||||
|
||||
@@ -14,7 +14,7 @@ Install latest Android SDK and NDK from http://developer.android.com/index.html
|
||||
You'll need to install Java Ant too. Since for building apk files some java classes are needed as well,
|
||||
it is recommended to install OpenJDK and its development files. (On RPM based distros
|
||||
usually called java-x.x.x-openjdk and java-x.x.x-openjdk-devel)
|
||||
The application will run on Android 1.6 and above, but will use features from Android 5.1 if available.
|
||||
The application will run on Android 2.3 and above, but will use features from Android 5.1 if available.
|
||||
The most supported environment for this port is Linux, MacOs should be okay too.
|
||||
If you're developing under Windows you'd better install Portable Ubuntu, to get proper Linux environment
|
||||
running inside Windows, then install Linux toolchain on it.
|
||||
|
||||
Reference in New Issue
Block a user