XSDL: Show Ctrl/Alt/Shift keys when Android screen keyboard is shown
This commit is contained in:
@@ -182,7 +182,7 @@ NonBlockingSwapBuffers=n
|
||||
RedefinedKeys="LALT UNDO NO_REMAP NO_REMAP UNDO HELP"
|
||||
|
||||
# Number of virtual keyboard keys (currently 6 is maximum)
|
||||
AppTouchscreenKeyboardKeysAmount=0
|
||||
AppTouchscreenKeyboardKeysAmount=3
|
||||
|
||||
# Redefine on-screen keyboard keys to SDL keysyms - 6 keyboard keys + 4 multitouch gestures (zoom in/out and rotate left/right)
|
||||
RedefinedKeysScreenKb="LALT RETURN KP_PLUS KP_MINUS SPACE DELETE KP_PLUS KP_MINUS UNDO HELP"
|
||||
@@ -196,7 +196,7 @@ RedefinedKeysScreenKbNames="LALT RETURN KP_PLUS KP_MINUS SPACE DELETE PLUS MINUS
|
||||
# 2 = Sun by Sirea (yellow, with round joystick)
|
||||
# 3 = Keen by Gerstrong (multicolor, with round joystick)
|
||||
# 4 = Retro by Santiago Radeff (red/white, with cross joystick)
|
||||
TouchscreenKeysTheme=2
|
||||
TouchscreenKeysTheme=0
|
||||
|
||||
# Redefine gamepad keys to SDL keysyms, button order is:
|
||||
# A B X Y L1 R1 L2 R2 LThumb RThumb
|
||||
|
||||
1
project/jni/application/xserver/AndroidPreBuild.sh
Symbolic link
1
project/jni/application/xserver/AndroidPreBuild.sh
Symbolic link
@@ -0,0 +1 @@
|
||||
../xserver-gimp/AndroidPreBuild.sh
|
||||
@@ -174,26 +174,8 @@ int main( int argc, char* argv[] )
|
||||
|
||||
if( screenButtons && !SDL_ANDROID_GetScreenKeyboardRedefinedByUser() )
|
||||
{
|
||||
SDL_Rect pos;
|
||||
pos.x = 0;
|
||||
pos.h = SDL_ListModes(NULL, 0)[0]->h / 20;
|
||||
pos.y = SDL_ListModes(NULL, 0)[0]->h - pos.h;
|
||||
pos.w = 40 * SDL_ListModes(NULL, 0)[0]->w / resolutionW;
|
||||
// Button coords are handled inside xserver/hw/kdrive/sdl/sdl.c
|
||||
SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_0, 1);
|
||||
SDL_ANDROID_SetScreenKeyboardButtonPos(SDL_ANDROID_SCREENKEYBOARD_BUTTON_0, &pos);
|
||||
SDL_ANDROID_SetScreenKeyboardButtonImagePos(SDL_ANDROID_SCREENKEYBOARD_BUTTON_0, &pos);
|
||||
SDL_ANDROID_SetScreenKeyboardButtonStayPressedAfterTouch(SDL_ANDROID_SCREENKEYBOARD_BUTTON_0, 1);
|
||||
pos.y -= pos.h;
|
||||
SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_1, 1);
|
||||
SDL_ANDROID_SetScreenKeyboardButtonPos(SDL_ANDROID_SCREENKEYBOARD_BUTTON_1, &pos);
|
||||
SDL_ANDROID_SetScreenKeyboardButtonImagePos(SDL_ANDROID_SCREENKEYBOARD_BUTTON_1, &pos);
|
||||
SDL_ANDROID_SetScreenKeyboardButtonStayPressedAfterTouch(SDL_ANDROID_SCREENKEYBOARD_BUTTON_1, 1);
|
||||
pos.y -= pos.h;
|
||||
SDL_ANDROID_SetScreenKeyboardButtonShown(SDL_ANDROID_SCREENKEYBOARD_BUTTON_2, 1);
|
||||
SDL_ANDROID_SetScreenKeyboardButtonPos(SDL_ANDROID_SCREENKEYBOARD_BUTTON_2, &pos);
|
||||
SDL_ANDROID_SetScreenKeyboardButtonImagePos(SDL_ANDROID_SCREENKEYBOARD_BUTTON_2, &pos);
|
||||
SDL_ANDROID_SetScreenKeyboardButtonStayPressedAfterTouch(SDL_ANDROID_SCREENKEYBOARD_BUTTON_2, 1);
|
||||
SDL_ANDROID_SetScreenKeyboardTransparency(255); // opaque
|
||||
}
|
||||
|
||||
__android_log_print(ANDROID_LOG_INFO, "XSDL", "XSDL video resolution %s, args:", screenres);
|
||||
|
||||
1
project/jni/application/xserver/ultimatedroid.raw
Symbolic link
1
project/jni/application/xserver/ultimatedroid.raw
Symbolic link
@@ -0,0 +1 @@
|
||||
../xserver-gimp/ultimatedroid.raw
|
||||
Reference in New Issue
Block a user