Fixed the NO_REMAP implementation, fixed few minor bg in Settings.java
This commit is contained in:
@@ -652,29 +652,34 @@ void SDL_ANDROID_WarpMouse(int x, int y)
|
||||
|
||||
static int processAndroidTrackball(int key, int action);
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
JNIEXPORT jint JNICALL
|
||||
JAVA_EXPORT_NAME(DemoGLSurfaceView_nativeKey) ( JNIEnv* env, jobject thiz, jint key, jint action )
|
||||
{
|
||||
#if SDL_VERSION_ATLEAST(1,3,0)
|
||||
#else
|
||||
if( !SDL_CurrentVideoSurface )
|
||||
return;
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
if( isTrackballUsed )
|
||||
if( processAndroidTrackball(key, action) )
|
||||
return;
|
||||
return 1;
|
||||
if( key == rightClickKey && rightClickMethod == RIGHT_CLICK_WITH_KEY )
|
||||
{
|
||||
SDL_ANDROID_MainThreadPushMouseButton( action ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_RIGHT );
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
if( (key == leftClickKey && leftClickMethod == LEFT_CLICK_WITH_KEY) || (clickMouseWithDpadCenter && key == KEYCODE_DPAD_CENTER) )
|
||||
{
|
||||
SDL_ANDROID_MainThreadPushMouseButton( action ? SDL_PRESSED : SDL_RELEASED, SDL_BUTTON_LEFT );
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if( TranslateKey(key) == SDLK_NO_REMAP )
|
||||
return 0;
|
||||
|
||||
SDL_ANDROID_MainThreadPushKeyboardKey( action ? SDL_PRESSED : SDL_RELEASED, TranslateKey(key) );
|
||||
return 1;
|
||||
}
|
||||
|
||||
static char * textInputBuffer = NULL;
|
||||
@@ -762,6 +767,7 @@ static int getClickTimeout(int v)
|
||||
return 1000;
|
||||
}
|
||||
|
||||
// Mwahaha overkill!
|
||||
JNIEXPORT void JNICALL
|
||||
JAVA_EXPORT_NAME(Settings_nativeSetMouseUsed) ( JNIEnv* env, jobject thiz,
|
||||
jint RightClickMethod, jint ShowScreenUnderFinger, jint LeftClickMethod,
|
||||
@@ -1331,7 +1337,6 @@ extern void SDL_ANDROID_MainThreadPushKeyboardKey(int pressed, SDL_scancode key)
|
||||
|
||||
SDL_Event * ev = &BufferedEvents[BufferedEventsEnd];
|
||||
|
||||
|
||||
if( moveMouseWithArrowKeys && (
|
||||
key == SDL_KEY(UP) || key == SDL_KEY(DOWN) ||
|
||||
key == SDL_KEY(LEFT) || key == SDL_KEY(RIGHT) ) )
|
||||
|
||||
Reference in New Issue
Block a user