Option for soft text input to emulate hw keyboard
This commit is contained in:
@@ -265,6 +265,16 @@ if [ -n "$var" ] ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$CompatibilityHacksTextInputEmulatesHwKeyboard" -o -z "$AUTO" ]; then
|
||||
echo
|
||||
echo -n "On-screen Android soft text input emulates hardware keyboard, this will only work with Hackers Keyboard app (y)/(n) ($CompatibilityHacksTextInputEmulatesHwKeyboard): "
|
||||
read var
|
||||
if [ -n "$var" ] ; then
|
||||
CompatibilityHacksTextInputEmulatesHwKeyboard="$var"
|
||||
CHANGED=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$AppUsesJoystick" -o -z "$AUTO" ]; then
|
||||
echo
|
||||
echo "Application uses joystick (y) or (n), the accelerometer (2-axis) or orientation sensor (3-axis)"
|
||||
@@ -575,6 +585,7 @@ echo SdlVideoResize=$SdlVideoResize >> AndroidAppSettings.cfg
|
||||
echo SdlVideoResizeKeepAspect=$SdlVideoResizeKeepAspect >> AndroidAppSettings.cfg
|
||||
echo CompatibilityHacks=$CompatibilityHacks >> AndroidAppSettings.cfg
|
||||
echo CompatibilityHacksStaticInit=$CompatibilityHacksStaticInit >> AndroidAppSettings.cfg
|
||||
echo CompatibilityHacksTextInputEmulatesHwKeyboard=$CompatibilityHacksTextInputEmulatesHwKeyboard >> AndroidAppSettings.cfg
|
||||
echo AppUsesMouse=$AppUsesMouse >> AndroidAppSettings.cfg
|
||||
echo AppNeedsTwoButtonMouse=$AppNeedsTwoButtonMouse >> AndroidAppSettings.cfg
|
||||
echo ShowMouseCursor=$ShowMouseCursor >> AndroidAppSettings.cfg
|
||||
@@ -679,6 +690,12 @@ else
|
||||
CompatibilityHacksStaticInit=false
|
||||
fi
|
||||
|
||||
if [ "$CompatibilityHacksTextInputEmulatesHwKeyboard" = "y" ] ; then
|
||||
CompatibilityHacksTextInputEmulatesHwKeyboard=true
|
||||
else
|
||||
CompatibilityHacksTextInputEmulatesHwKeyboard=false
|
||||
fi
|
||||
|
||||
if [ "$AppUsesMouse" = "y" ] ; then
|
||||
AppUsesMouse=true
|
||||
else
|
||||
@@ -824,6 +841,7 @@ cat project/src/Globals.java | \
|
||||
sed "s/public static boolean NeedGles2 = .*;/public static boolean NeedGles2 = $NeedGles2;/" | \
|
||||
sed "s/public static boolean CompatibilityHacksVideo = .*;/public static boolean CompatibilityHacksVideo = $CompatibilityHacks;/" | \
|
||||
sed "s/public static boolean CompatibilityHacksStaticInit = .*;/public static boolean CompatibilityHacksStaticInit = $CompatibilityHacksStaticInit;/" | \
|
||||
sed "s/public static boolean CompatibilityHacksTextInputEmulatesHwKeyboard = .*;/public static boolean CompatibilityHacksTextInputEmulatesHwKeyboard = $CompatibilityHacksTextInputEmulatesHwKeyboard;/" | \
|
||||
sed "s/public static boolean HorizontalOrientation = .*;/public static boolean HorizontalOrientation = $HorizontalOrientation;/" | \
|
||||
sed "s/public static boolean InhibitSuspend = .*;/public static boolean InhibitSuspend = $InhibitSuspend;/" | \
|
||||
sed "s/public static boolean AppUsesMouse = .*;/public static boolean AppUsesMouse = $AppUsesMouse;/" | \
|
||||
|
||||
@@ -39,6 +39,7 @@ class Globals {
|
||||
public static boolean NeedGles2 = false;
|
||||
public static boolean CompatibilityHacksVideo = false;
|
||||
public static boolean CompatibilityHacksStaticInit = false;
|
||||
public static boolean CompatibilityHacksTextInputEmulatesHwKeyboard = false;
|
||||
public static boolean HorizontalOrientation = true;
|
||||
public static boolean InhibitSuspend = false;
|
||||
public static String ReadmeText = "^You may press \"Home\" now - the data will be downloaded in background".replace("^","\n");
|
||||
|
||||
@@ -309,13 +309,21 @@ public class MainActivity extends Activity {
|
||||
|
||||
public void showScreenKeyboard(final String oldText, boolean sendBackspace)
|
||||
{
|
||||
if(Globals.CompatibilityHacksTextInputEmulatesHwKeyboard)
|
||||
{
|
||||
_inputManager.showSoftInput(mGLView, InputMethodManager.SHOW_FORCED);
|
||||
mGLView.setFocusable(true);
|
||||
mGLView.setFocusableInTouchMode(true);
|
||||
mGLView.requestFocus();
|
||||
return;
|
||||
}
|
||||
if(_screenKeyboard != null)
|
||||
return;
|
||||
class myKeyListener implements OnKeyListener
|
||||
class simpleKeyListener implements OnKeyListener
|
||||
{
|
||||
MainActivity _parent;
|
||||
boolean sendBackspace;
|
||||
myKeyListener(MainActivity parent, boolean sendBackspace) { _parent = parent; this.sendBackspace = sendBackspace; };
|
||||
simpleKeyListener(MainActivity parent, boolean sendBackspace) { _parent = parent; this.sendBackspace = sendBackspace; };
|
||||
public boolean onKey(View v, int keyCode, KeyEvent event)
|
||||
{
|
||||
if ((event.getAction() == KeyEvent.ACTION_UP) && ((keyCode == KeyEvent.KEYCODE_ENTER) || (keyCode == KeyEvent.KEYCODE_BACK)))
|
||||
@@ -335,7 +343,7 @@ public class MainActivity extends Activity {
|
||||
};
|
||||
_screenKeyboard = new EditText(this);
|
||||
_videoLayout.addView(_screenKeyboard);
|
||||
_screenKeyboard.setOnKeyListener(new myKeyListener(this, sendBackspace));
|
||||
_screenKeyboard.setOnKeyListener(new simpleKeyListener(this, sendBackspace));
|
||||
_screenKeyboard.setHint(R.string.text_edit_click_here);
|
||||
_screenKeyboard.setText(oldText);
|
||||
_screenKeyboard.setKeyListener(new TextKeyListener(TextKeyListener.Capitalize.NONE, false));
|
||||
|
||||
@@ -15,6 +15,7 @@ SdlVideoResize=y
|
||||
SdlVideoResizeKeepAspect=n
|
||||
CompatibilityHacks=y
|
||||
CompatibilityHacksStaticInit=n
|
||||
CompatibilityHacksTextInputEmulatesHwKeyboard=y
|
||||
AppUsesMouse=y
|
||||
AppNeedsTwoButtonMouse=y
|
||||
ShowMouseCursor=y
|
||||
@@ -33,8 +34,8 @@ StartupMenuButtonTimeout=3000
|
||||
HiddenMenuOptions='OptionalDownloadConfig'
|
||||
FirstStartMenuOptions='new Settings.DummyMenu()'
|
||||
MultiABI=n
|
||||
AppVersionCode=0908505
|
||||
AppVersionName="0.90.85.05"
|
||||
AppVersionCode=0908506
|
||||
AppVersionName="0.90.85.06"
|
||||
ResetSdlConfigForThisVersion=y
|
||||
DeleteFilesOnUpgrade="%"
|
||||
CompiledLibraries="jpeg png zzip"
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
Only in milkytracker-0.90.85: config.h
|
||||
Only in milkytracker-0.90.85: config.log
|
||||
Only in milkytracker-0.90.85: config.status
|
||||
diff -u -r milkytracker-0.90.85-old/configure milkytracker-0.90.85/configure
|
||||
--- milkytracker-0.90.85-old/configure 2010-01-02 02:03:37.000000000 +0200
|
||||
+++ milkytracker-0.90.85/configure 2011-07-04 16:43:35.374937729 +0300
|
||||
+++ milkytracker-0.90.85/configure 2012-06-19 14:47:54.608553718 +0300
|
||||
@@ -5431,95 +5431,9 @@
|
||||
fi
|
||||
|
||||
@@ -97,9 +100,47 @@ diff -u -r milkytracker-0.90.85-old/configure milkytracker-0.90.85/configure
|
||||
SDL_VERSION=1.2.0
|
||||
|
||||
# Check whether --with-sdl-prefix was given.
|
||||
Only in milkytracker-0.90.85: Makefile
|
||||
Only in milkytracker-0.90.85/src/compression: .deps
|
||||
Only in milkytracker-0.90.85/src/compression: Makefile
|
||||
Only in milkytracker-0.90.85/src/compression/zziplib/generic: .deps
|
||||
Only in milkytracker-0.90.85/src/compression/zziplib/generic: Makefile
|
||||
Only in milkytracker-0.90.85/src/fx: .deps
|
||||
Only in milkytracker-0.90.85/src/fx: Makefile
|
||||
Only in milkytracker-0.90.85/src: Makefile
|
||||
Only in milkytracker-0.90.85/src/midi: .deps
|
||||
Only in milkytracker-0.90.85/src/midi: Makefile
|
||||
Only in milkytracker-0.90.85/src/milkyplay: .deps
|
||||
Only in milkytracker-0.90.85/src/milkyplay: Makefile
|
||||
Only in milkytracker-0.90.85/src/ppui: .deps
|
||||
Only in milkytracker-0.90.85/src/ppui: Makefile
|
||||
Only in milkytracker-0.90.85/src/ppui/osinterface: .deps
|
||||
Only in milkytracker-0.90.85/src/ppui/osinterface: Makefile
|
||||
diff -u -r milkytracker-0.90.85-old/src/ppui/sdl/DisplayDevice_SDL.cpp milkytracker-0.90.85/src/ppui/sdl/DisplayDevice_SDL.cpp
|
||||
--- milkytracker-0.90.85-old/src/ppui/sdl/DisplayDevice_SDL.cpp 2009-02-22 12:20:39.000000000 +0200
|
||||
+++ milkytracker-0.90.85/src/ppui/sdl/DisplayDevice_SDL.cpp 2012-06-19 14:52:22.140551268 +0300
|
||||
@@ -47,6 +47,7 @@
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
+ SDL_Flip(screen); // Update screen on Android
|
||||
|
||||
return screen;
|
||||
}
|
||||
@@ -173,6 +174,8 @@
|
||||
void PPDisplayDevice::setSize(const PPSize& size)
|
||||
{
|
||||
theSurface = SDL_SetVideoMode(size.width, size.height, theSurface->format->BitsPerPixel, theSurface->flags);
|
||||
+ if(theSurface)
|
||||
+ SDL_Flip(theSurface); // Update screen on Android
|
||||
}
|
||||
|
||||
bool PPDisplayDevice::goFullScreen(bool b)
|
||||
Only in milkytracker-0.90.85/src/tracker: .deps
|
||||
Only in milkytracker-0.90.85/src/tracker: Makefile
|
||||
diff -u -r milkytracker-0.90.85-old/src/tracker/sdl/SDL_Main.cpp milkytracker-0.90.85/src/tracker/sdl/SDL_Main.cpp
|
||||
--- milkytracker-0.90.85-old/src/tracker/sdl/SDL_Main.cpp 2009-02-22 12:20:39.000000000 +0200
|
||||
+++ milkytracker-0.90.85/src/tracker/sdl/SDL_Main.cpp 2011-07-05 18:48:50.025434998 +0300
|
||||
+++ milkytracker-0.90.85/src/tracker/sdl/SDL_Main.cpp 2012-06-19 14:47:54.608553718 +0300
|
||||
@@ -303,7 +303,7 @@
|
||||
#endif
|
||||
|
||||
@@ -204,3 +245,4 @@ diff -u -r milkytracker-0.90.85-old/src/tracker/sdl/SDL_Main.cpp milkytracker-0.
|
||||
}
|
||||
}
|
||||
}
|
||||
Only in milkytracker-0.90.85: stamp-h1
|
||||
|
||||
Reference in New Issue
Block a user