Merge branch 'sdl_android' of github.com:pelya/commandergenius into sdl_android
This commit is contained in:
6
bugs.txt
6
bugs.txt
@@ -3,6 +3,8 @@ Known bugs
|
||||
|
||||
- With 4:3 screen aspect ratio the on-screen buttons are not shown on the inactive part of screen.
|
||||
|
||||
- Put video at the center of the screen with 4:3 aspect ratio option
|
||||
|
||||
- Calling SDL_SetVideoMode() with SDL 1.3 several times makes it crash.
|
||||
|
||||
- Calling SDL_Init()/SDL_Quit() several times will make SDL 1.2 crash.
|
||||
@@ -14,12 +16,8 @@ Known bugs
|
||||
Requested features
|
||||
==================
|
||||
|
||||
- Support for resuming download of partially-downloaded files.
|
||||
|
||||
- Perform a check for free space available on SD card before writing there, and write to the internal storage if SD card is unplugged.
|
||||
|
||||
- Force SW video mode from AndroidAppSettings.cfg, ignore SDL_HWSURFACE if app does not explicitly support it.
|
||||
|
||||
- Split Settings.java into several files
|
||||
|
||||
- Show/hide screen controls with longpress on Text Edit button.
|
||||
|
||||
4
build.sh
4
build.sh
@@ -15,7 +15,7 @@ if [ "$#" -gt 0 -a "$1" = "-r" ]; then
|
||||
run_apk=true
|
||||
fi
|
||||
|
||||
[ -e local.properties ] || {
|
||||
[ -e project/local.properties ] || {
|
||||
android update project -p project || exit 1
|
||||
rm -f project/src/Globals.java
|
||||
}
|
||||
@@ -23,7 +23,7 @@ fi
|
||||
# export PATH=$PATH:~/src/endless_space/android-ndk-r7
|
||||
NDKBUILDPATH=$PATH
|
||||
export `grep "AppFullName=" AndroidAppSettings.cfg`
|
||||
if ( grep "package $AppFullName;" project/src/Globals.java > /dev/null && \
|
||||
if ( grep "package $AppFullName;" project/src/Globals.java > /dev/null 2>&1 && \
|
||||
[ "`readlink AndroidAppSettings.cfg`" -ot "project/src/Globals.java" ] && \
|
||||
[ -z "`find project/java/* project/AndroidManifestTemplate.xml -cnewer project/src/Globals.java`" ] && \
|
||||
[ -z "`find project/jni/application/src/AndroidData/* -cnewer project/src/Globals.java`" ] ) ; then true ; else
|
||||
|
||||
@@ -630,7 +630,7 @@ fi
|
||||
if [ -z "$AUTO" -o -z "$MinimumScreenSize" ]; then
|
||||
echo
|
||||
echo "Screen size is used by Google Play to prevent an app to be installed on devices with smaller screens"
|
||||
echo -n "Minimum screen size that application supports: (s)mall / (n)ormal / (l)arge ($MinimumScreenSize): "
|
||||
echo -n "Minimum screen size that application supports: (s)mall / (m)edium / (l)arge ($MinimumScreenSize): "
|
||||
read var
|
||||
if [ -n "$var" ] ; then
|
||||
MinimumScreenSize="$var"
|
||||
|
||||
@@ -8,7 +8,7 @@ APPVER=`grep AppVersionName AndroidAppSettings.cfg | sed 's/.*=//' | tr -d '"' |
|
||||
tar -c -z --exclude-vcs --exclude="*.o" --exclude="*.d" --exclude="*.dep" \
|
||||
-f $APPNAME-$APPVER-src.tar.gz \
|
||||
`git ls-files --exclude-standard | grep -v '^project/jni/application/.*'` \
|
||||
`find project/jni/application -maxdepth 1 -type f` \
|
||||
`find project/jni/application -maxdepth 1 -type f -o -type l` \
|
||||
project/jni/application/src \
|
||||
project/jni/application/`readlink project/jni/application/src` \
|
||||
project/AndroidManifest.xml project/src
|
||||
|
||||
@@ -674,6 +674,8 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
|
||||
String cfglog = "";
|
||||
int idx = 0;
|
||||
int selectidx = -1;
|
||||
|
||||
Log.v("SDL", "Desired GL config: " + "R" + mRedSize + "G" + mGreenSize + "B" + mBlueSize + "A" + mAlphaSize + " depth " + mDepthSize + " stencil " + mStencilSize + " type " + (mIsGles2 ? "GLES2" : "GLES"));
|
||||
for(EGLConfig config : configs) {
|
||||
if ( config == null )
|
||||
continue;
|
||||
@@ -699,12 +701,16 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
|
||||
int distance = Math.abs(r - mRedSize)
|
||||
+ Math.abs(g - mGreenSize)
|
||||
+ Math.abs(b - mBlueSize) + Math.abs(a - mAlphaSize);
|
||||
int dist2 = distance;
|
||||
if( (d > 0) != (mDepthSize > 0) )
|
||||
distance += (d > 0) ? 5 : 1; // Small penalty if we don't need zbuffer but it is present
|
||||
if( (s > 0) == (mStencilSize > 0) )
|
||||
distance += (s > 0) ? 5 : 1;
|
||||
distance += (mDepthSize > 0) ? 5 : 1; // Small penalty if we don't need zbuffer but it is present
|
||||
int dist3 = distance;
|
||||
if( (s > 0) != (mStencilSize > 0) )
|
||||
distance += (mStencilSize > 0) ? 5 : 1;
|
||||
int dist4 = distance;
|
||||
if( (rendertype & desiredtype) == 0 )
|
||||
distance += 5;
|
||||
int dist5 = distance;
|
||||
if( caveat == EGL10.EGL_SLOW_CONFIG )
|
||||
distance += 4;
|
||||
if( caveat == EGL10.EGL_NON_CONFORMANT_CONFIG ) // dunno what that means, probably R and B channels swapped
|
||||
@@ -726,7 +732,7 @@ public class GLSurfaceView_SDL extends SurfaceView implements SurfaceHolder.Call
|
||||
caveat == EGL10.EGL_NON_CONFORMANT_CONFIG ? "non-conformant" :
|
||||
String.valueOf(caveat)));
|
||||
cfgcur += " nr " + nativeRender;
|
||||
cfgcur += " pos " + distance;
|
||||
cfgcur += " pos " + distance + " (" + dist2 + "," + dist3 + "," + dist4 + "," + dist5 + ")";
|
||||
Log.v("SDL", "GL config " + idx + ": " + cfgcur);
|
||||
if (distance < closestDistance) {
|
||||
closestDistance = distance;
|
||||
|
||||
@@ -72,6 +72,7 @@ import android.os.Message;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.view.Display;
|
||||
import android.text.InputType;
|
||||
|
||||
public class MainActivity extends Activity
|
||||
{
|
||||
@@ -418,13 +419,35 @@ public class MainActivity extends Activity
|
||||
_parent.hideScreenKeyboard();
|
||||
return true;
|
||||
}
|
||||
if ((sendBackspace && event.getAction() == KeyEvent.ACTION_UP) && (keyCode == KeyEvent.KEYCODE_DEL || keyCode == KeyEvent.KEYCODE_CLEAR))
|
||||
if (keyCode == KeyEvent.KEYCODE_DEL || keyCode == KeyEvent.KEYCODE_CLEAR)
|
||||
{
|
||||
synchronized(textInput) {
|
||||
DemoRenderer.nativeTextInput( 8, 0 ); // Send backspace to native code
|
||||
if (sendBackspace && event.getAction() == KeyEvent.ACTION_UP)
|
||||
{
|
||||
synchronized(textInput) {
|
||||
DemoRenderer.nativeTextInput( 8, 0 ); // Send backspace to native code
|
||||
}
|
||||
}
|
||||
// EditText deletes two characters at a time, here's a hacky fix
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN && (event.getFlags() | KeyEvent.FLAG_SOFT_KEYBOARD) != 0)
|
||||
{
|
||||
EditText t = (EditText) v;
|
||||
int start = t.getSelectionStart(); //get cursor starting position
|
||||
int end = t.getSelectionEnd(); //get cursor ending position
|
||||
if ( start < 0 )
|
||||
return true;
|
||||
if ( end < 0 || end == start )
|
||||
{
|
||||
start --;
|
||||
if ( start < 0 )
|
||||
return true;
|
||||
end = start + 1;
|
||||
}
|
||||
t.setText(t.getText().toString().substring(0, start) + t.getText().toString().substring(end));
|
||||
t.setSelection(start);
|
||||
return true;
|
||||
}
|
||||
return false; // and proceed to delete text in keyboard input field
|
||||
}
|
||||
//System.out.println("Key " + keyCode + " flags " + event.getFlags() + " action " + event.getAction());
|
||||
return false;
|
||||
}
|
||||
};
|
||||
@@ -433,7 +456,8 @@ public class MainActivity extends Activity
|
||||
_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));
|
||||
//_screenKeyboard.setKeyListener(new TextKeyListener(TextKeyListener.Capitalize.NONE, false));
|
||||
_screenKeyboard.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_MULTI_LINE | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
|
||||
_screenKeyboard.setFocusableInTouchMode(true);
|
||||
_screenKeyboard.setFocusable(true);
|
||||
_screenKeyboard.requestFocus();
|
||||
|
||||
@@ -300,7 +300,7 @@ class Settings
|
||||
Globals.TouchscreenKeyboardDrawSize = settingsFile.readInt();
|
||||
int cfgVersion = settingsFile.readInt();
|
||||
System.out.println("libSDL: old cfg version " + cfgVersion + ", our version " + p.getApplicationVersion());
|
||||
if( cfgVersion < p.getApplicationVersion() )
|
||||
if( cfgVersion != p.getApplicationVersion() )
|
||||
{
|
||||
DeleteFilesOnUpgrade();
|
||||
if( Globals.ResetSdlConfigForThisVersion )
|
||||
@@ -627,7 +627,7 @@ class Settings
|
||||
{
|
||||
Globals.DownloadToSdcard = (item != 0);
|
||||
Globals.DataDir = Globals.DownloadToSdcard ?
|
||||
Environment.getExternalStorageDirectory().getAbsolutePath() + "/app-data/" + Globals.class.getPackage().getName() :
|
||||
SdcardAppPath.getPath(p) :
|
||||
p.getFilesDir().getAbsolutePath();
|
||||
goBack(p);
|
||||
}
|
||||
@@ -2254,7 +2254,7 @@ class Settings
|
||||
|
||||
public void onTouchEvent(final MotionEvent ev)
|
||||
{
|
||||
if(Globals.ScreenKbControlsLayout.length >= currentButton)
|
||||
if(currentButton >= Globals.ScreenKbControlsLayout.length)
|
||||
{
|
||||
setupButton(false);
|
||||
return;
|
||||
|
||||
@@ -15,7 +15,7 @@ SdlVideoResize=y
|
||||
SdlVideoResizeKeepAspect=n
|
||||
CompatibilityHacks=n
|
||||
CompatibilityHacksStaticInit=n
|
||||
CompatibilityHacksTextInputEmulatesHwKeyboard=y
|
||||
CompatibilityHacksTextInputEmulatesHwKeyboard=n
|
||||
CompatibilityHacksPreventAudioChopping=n
|
||||
CompatibilityHacksAppIgnoresAudioBufferSize=n
|
||||
AppUsesMouse=y
|
||||
@@ -29,7 +29,7 @@ AppUsesAccelerometer=y
|
||||
AppUsesMultitouch=y
|
||||
NonBlockingSwapBuffers=n
|
||||
RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP SPACE ESCAPE"
|
||||
AppTouchscreenKeyboardKeysAmount=0
|
||||
AppTouchscreenKeyboardKeysAmount=6
|
||||
AppTouchscreenKeyboardKeysAmountAutoFire=0
|
||||
RedefinedKeysScreenKb="0 1 2 3 4 5 6 7 8 9"
|
||||
StartupMenuButtonTimeout=3000
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
#include <math.h>
|
||||
#include <android/log.h>
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL_image.h"
|
||||
#include <SDL/SDL.h>
|
||||
#include <SDL/SDL_image.h>
|
||||
#include <SDL/SDL_screenkeyboard.h>
|
||||
|
||||
#define fprintf(X, ...) __android_log_print(ANDROID_LOG_INFO, "Ballfield", __VA_ARGS__)
|
||||
#define printf(...) __android_log_print(ANDROID_LOG_INFO, "Ballfield", __VA_ARGS__)
|
||||
@@ -438,9 +439,11 @@ int main(int argc, char* argv[])
|
||||
struct TouchPointer_t { int x; int y; int pressure; int pressed; } touchPointers[MAX_POINTERS];
|
||||
int accel[2], screenjoy[2];
|
||||
SDL_Surface *mouse[4];
|
||||
int screenKeyboardShown = 0;
|
||||
|
||||
|
||||
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
|
||||
SDL_EnableUNICODE(1);
|
||||
|
||||
atexit(SDL_Quit);
|
||||
|
||||
@@ -632,7 +635,7 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
if(evt.type == SDL_KEYUP || evt.type == SDL_KEYDOWN)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL key event: evt %s state %s key %d scancode %d mod %d unicode %d", evt.type == SDL_KEYUP ? "UP " : "DOWN" , evt.key.state == SDL_PRESSED ? "PRESSED " : "RELEASED", (int)evt.key.keysym.sym, (int)evt.key.keysym.scancode, (int)evt.key.keysym.mod, (int)evt.key.keysym.unicode);
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL key event: evt %s state %s key %4d %12s scancode %4d mod %2d unicode %d", evt.type == SDL_KEYUP ? "UP " : "DOWN" , evt.key.state == SDL_PRESSED ? "PRESSED " : "RELEASED", (int)evt.key.keysym.sym, SDL_GetKeyName(evt.key.keysym.sym), (int)evt.key.keysym.scancode, (int)evt.key.keysym.mod, (int)evt.key.keysym.unicode);
|
||||
if(evt.key.keysym.sym == SDLK_ESCAPE)
|
||||
return 0;
|
||||
}
|
||||
@@ -671,6 +674,11 @@ int main(int argc, char* argv[])
|
||||
touchPointers[evt.jball.ball].y = evt.jball.yrel;
|
||||
}
|
||||
}
|
||||
if( screenKeyboardShown != SDL_IsScreenKeyboardShown(NULL))
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_INFO, "Ballfield", "Screen keyboard shown: %d -> %d", screenKeyboardShown, SDL_IsScreenKeyboardShown(NULL));
|
||||
screenKeyboardShown = SDL_IsScreenKeyboardShown(NULL);
|
||||
}
|
||||
|
||||
/* Animate */
|
||||
x_speed = 500.0 * sin(t * 0.37);
|
||||
|
||||
@@ -5,10 +5,10 @@ AppName="OpenArena"
|
||||
AppFullName=ws.openarena.sdl
|
||||
ScreenOrientation=h
|
||||
InhibitSuspend=n
|
||||
AppDataDownloadUrl="!Game data|:baseoa/pak0.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak0.pk3/download^!Game data|:baseoa/pak1-maps.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak1-maps.pk3/download^!Game data|:baseoa/pak2-players-mature.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak2-players-mature.pk3/download^!Game data|:baseoa/pak2-players.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak2-players.pk3/download^!Game data|:baseoa/pak4-textures.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak4-textures.pk3/download^!Game data|:baseoa/pak5-TA.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak5-TA.pk3/download^!Game data|:baseoa/pak6-misc.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak6-misc.pk3/download^!Game data|:baseoa/pak6-patch085.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak6-patch085.pk3/download^!Game data|:baseoa/pak6-patch088.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak6-patch088.pk3/download^!Game data|:baseoa/skn-arachna-forlorna.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/skn-arachna-forlorna.pk3/download^!Game logic|:baseoa/pak7-android.pk3:vm.zip"
|
||||
AppDataDownloadUrl="!Game data|:baseoa/pak0.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak0.pk3/download^!Game data|:baseoa/pak1-maps.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak1-maps.pk3/download^!Game data|:baseoa/pak2-players-mature.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak2-players-mature.pk3/download^!Game data|:baseoa/pak2-players.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak2-players.pk3/download^!Game data|:baseoa/pak4-textures.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak4-textures.pk3/download^!Game data|:baseoa/pak5-TA.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak5-TA.pk3/download^!Game data|:baseoa/pak6-misc.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak6-misc.pk3/download^!Game data|:baseoa/pak6-patch085.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak6-patch085.pk3/download^!Game data|:baseoa/pak6-patch088.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/pak6-patch088.pk3/download^!Game data|:baseoa/skn-arachna-forlorna.pk3:http://sourceforge.net/projects/libsdl-android/files/OpenArena/0.8.8/skn-arachna-forlorna.pk3/download^!Game logic|:baseoa/pak7-android.pk3:pak7-android.pk3"
|
||||
VideoDepthBpp=24
|
||||
NeedDepthBuffer=y
|
||||
NeedStencilBuffer=y
|
||||
NeedStencilBuffer=n
|
||||
NeedGles2=n
|
||||
SwVideoMode=n
|
||||
SdlVideoResize=y
|
||||
@@ -25,22 +25,22 @@ ForceRelativeMouseMode=n
|
||||
AppNeedsArrowKeys=y
|
||||
AppNeedsTextInput=y
|
||||
AppUsesJoystick=y
|
||||
AppUsesAccelerometer=y
|
||||
AppUsesAccelerometer=n
|
||||
AppUsesMultitouch=y
|
||||
NonBlockingSwapBuffers=n
|
||||
RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP SPACE ESCAPE"
|
||||
AppTouchscreenKeyboardKeysAmount=3
|
||||
AppTouchscreenKeyboardKeysAmount=5
|
||||
AppTouchscreenKeyboardKeysAmountAutoFire=0
|
||||
RedefinedKeysScreenKb="SLASH BACKSPACE TAB RETURN UNKNOWN UNKNOWN UNKNOWN UNKNOWN UNKNOWN UNKNOWN"
|
||||
RedefinedKeysScreenKb="SLASH BACKSPACE TAB END LCTRL SPACE UNKNOWN UNKNOWN UNKNOWN UNKNOWN"
|
||||
StartupMenuButtonTimeout=3000
|
||||
HiddenMenuOptions='OptionalDownloadConfig DisplaySizeConfig'
|
||||
FirstStartMenuOptions=''
|
||||
MultiABI=y
|
||||
AppMinimumRAM=350
|
||||
AppVersionCode=08804
|
||||
AppVersionName="0.8.8.04"
|
||||
AppVersionCode=08813
|
||||
AppVersionName="0.8.8.13"
|
||||
ResetSdlConfigForThisVersion=y
|
||||
DeleteFilesOnUpgrade="libsdl-DownloadFinished-10.flag"
|
||||
DeleteFilesOnUpgrade="libsdl-DownloadFinished-10.flag .openarena/baseoa/q3config.cfg"
|
||||
CompiledLibraries="sdl_mixer sdl_image freetype curl vorbis ogg"
|
||||
CustomBuildScript=y
|
||||
AppCflags='-O2 -finline-functions'
|
||||
|
||||
@@ -3,16 +3,19 @@
|
||||
LOCAL_PATH=`dirname $0`
|
||||
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
|
||||
|
||||
[ "$1" = "armeabi" ] && (
|
||||
mkdir -p AndroidData
|
||||
[ -e libapplication.so ] || ln -s libapplication-armeabi.so libapplication.so
|
||||
make -j8 -C vm BUILD_MISSIONPACK=0 || exit 1
|
||||
cd vm/build/release-linux-`uname -m`/baseq3
|
||||
rm -f ../../../../AndroidData/binaries.zip ../../../../AndroidData/vm.zip
|
||||
zip -r ../../../../AndroidData/vm.zip vm
|
||||
cd ../../../android
|
||||
zip ../../AndroidData/vm.zip *
|
||||
)
|
||||
if [ "$1" = "armeabi" ]; then (
|
||||
mkdir -p AndroidData
|
||||
[ -e libapplication.so ] || ln -s libapplication-armeabi.so libapplication.so
|
||||
make -j8 -C vm BUILD_MISSIONPACK=0 || exit 1
|
||||
cd vm/build/release-linux-`uname -m`/baseq3
|
||||
#rm -f ../../../../AndroidData/binaries.zip ../../../../AndroidData/pak7-android.pk3
|
||||
zip -r ../../../../AndroidData/pak7-android.pk3 vm
|
||||
cd ../../../android
|
||||
zip -r ../../AndroidData/pak7-android.pk3 *
|
||||
ln -sf ../engine/misc/quake3-tango.png ../../AndroidData/logo.png
|
||||
exit 0
|
||||
) || exit 1
|
||||
fi
|
||||
|
||||
env NO_SHARED_LIBS=1 BUILD_EXECUTABLE=1 V=1 ../setEnvironment-armeabi.sh make -C vm -j8 PLATFORM=android ARCH=$1 USE_LOCAL_HEADERS=0 BUILD_MISSIONPACK=0 || exit 1
|
||||
|
||||
|
||||
Submodule project/jni/application/openarena/engine updated: f298c6ef3e...18cec9de7c
@@ -1,2 +1,3 @@
|
||||
#!/bin/sh
|
||||
adb shell rm /sdcard/Android/data/ws.openarena.sdl/files/libsdl-DownloadFinished-10.flag
|
||||
adb shell rm -r /sdcard/Android/data/ws.openarena.sdl/files/.openarena
|
||||
|
||||
Submodule project/jni/application/openarena/vm updated: 4a39bfea3f...86f8d32314
@@ -1,34 +1,54 @@
|
||||
# The application settings for Android libSDL port
|
||||
AppSettingVersion=16
|
||||
AppSettingVersion=17
|
||||
LibSdlVersion=1.2
|
||||
AppName="Pachi el marciano"
|
||||
AppFullName=net.sourceforge.dragontech.pachi
|
||||
ScreenOrientation=h
|
||||
InhibitSuspend=n
|
||||
AppDataDownloadUrl="Game data is 30 Mb|http://sourceforge.net/projects/libsdl-android/files/Pachi/pachi.zip/download"
|
||||
VideoDepthBpp=16
|
||||
NeedDepthBuffer=n
|
||||
NeedStencilBuffer=n
|
||||
NeedGles2=n
|
||||
SwVideoMode=y
|
||||
SdlVideoResize=y
|
||||
SdlVideoResizeKeepAspect=n
|
||||
NeedDepthBuffer=n
|
||||
CompatibilityHacks=n
|
||||
CompatibilityHacksStaticInit=n
|
||||
CompatibilityHacksTextInputEmulatesHwKeyboard=n
|
||||
CompatibilityHacksPreventAudioChopping=n
|
||||
CompatibilityHacksAppIgnoresAudioBufferSize=n
|
||||
AppUsesMouse=n
|
||||
AppNeedsTwoButtonMouse=n
|
||||
ShowMouseCursor=n
|
||||
ForceRelativeMouseMode=n
|
||||
AppNeedsArrowKeys=y
|
||||
AppNeedsTextInput=y
|
||||
AppUsesJoystick=n
|
||||
AppHandlesJoystickSensitivity=n
|
||||
AppUsesAccelerometer=n
|
||||
AppUsesMultitouch=n
|
||||
NonBlockingSwapBuffers=n
|
||||
RedefinedKeys="SPACE RETURN"
|
||||
AppTouchscreenKeyboardKeysAmount=1
|
||||
AppTouchscreenKeyboardKeysAmountAutoFire=0
|
||||
RedefinedKeysScreenKb="SPACE RETURN"
|
||||
StartupMenuButtonTimeout=3000
|
||||
HiddenMenuOptions=''
|
||||
FirstStartMenuOptions=''
|
||||
MultiABI=n
|
||||
AppVersionCode=104
|
||||
AppVersionName="1.04"
|
||||
AppMinimumRAM=0
|
||||
AppVersionCode=106
|
||||
AppVersionName="1.06"
|
||||
ResetSdlConfigForThisVersion=y
|
||||
DeleteFilesOnUpgrade="%"
|
||||
CompiledLibraries="sdl_mixer"
|
||||
CustomBuildScript=n
|
||||
AppCflags='-O2 -finline-functions -Wno-write-strings'
|
||||
AppLdflags=''
|
||||
AppSubdirsBuild=''
|
||||
AppUseCrystaXToolchain=n
|
||||
AppCmdline=''
|
||||
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
|
||||
MinimumScreenSize=n
|
||||
AdmobPublisherId=n
|
||||
AdmobTestDeviceId=
|
||||
AdmobBannerSize=
|
||||
|
||||
@@ -832,7 +832,7 @@ JNIEXPORT void JNICALL
|
||||
JAVA_EXPORT_NAME(DemoRenderer_nativeTextInputFinished) ( JNIEnv* env, jobject thiz )
|
||||
{
|
||||
textInputBuffer = NULL;
|
||||
SDL_ANDROID_TextInputFinished();
|
||||
SDL_ANDROID_TextInputFinished = 1;
|
||||
}
|
||||
|
||||
static void updateOrientation ( float accX, float accY, float accZ );
|
||||
@@ -1943,6 +1943,14 @@ void SDL_ANDROID_DeferredTextInput()
|
||||
if( isMouseUsed )
|
||||
SDL_ANDROID_MainThreadPushMouseMotion(currentMouseX + (currentMouseX % 2 ? -1 : 1), currentMouseY); // Force screen redraw
|
||||
}
|
||||
else
|
||||
{
|
||||
if( SDL_ANDROID_TextInputFinished )
|
||||
{
|
||||
SDL_ANDROID_TextInputFinished = 0;
|
||||
SDL_ANDROID_IsScreenKeyboardShownFlag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
SDL_mutexV(deferredTextMutex);
|
||||
};
|
||||
@@ -1994,7 +2002,7 @@ extern void SDL_ANDROID_MainThreadPushText( int ascii, int unicode )
|
||||
deferredTextIdx2 = 0;
|
||||
deferredText[deferredTextIdx2].down = SDL_RELEASED;
|
||||
deferredText[deferredTextIdx2].scancode = ascii;
|
||||
deferredText[deferredTextIdx2].unicode = unicode;
|
||||
deferredText[deferredTextIdx2].unicode = 0;
|
||||
if( shiftRequired )
|
||||
{
|
||||
deferredTextIdx2++;
|
||||
|
||||
@@ -115,7 +115,7 @@ int ANDROID_ToggleFullScreen(_THIS, int fullscreen)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define SDL_NUMMODES 14
|
||||
#define SDL_NUMMODES 23
|
||||
static SDL_Rect *SDL_modelist[SDL_NUMMODES+1];
|
||||
|
||||
//#define SDL_modelist (this->hidden->SDL_modelist)
|
||||
@@ -284,7 +284,16 @@ int ANDROID_VideoInit(_THIS, SDL_PixelFormat *vformat)
|
||||
SDL_modelist[11]->w = 544; SDL_modelist[11]->h = 332; // I have no idea where this videomode is used
|
||||
SDL_modelist[12]->w = 640; SDL_modelist[12]->h = 350; // For PrefClub app
|
||||
SDL_modelist[13]->w = 320; SDL_modelist[13]->h = 256; // For UAE4ALL2
|
||||
SDL_modelist[14] = NULL;
|
||||
SDL_modelist[14]->w = 640; SDL_modelist[14]->h = 200; // For UAE4ALL2
|
||||
SDL_modelist[15]->w = 640; SDL_modelist[15]->h = 240; // For UAE4ALL2
|
||||
SDL_modelist[16]->w = 640; SDL_modelist[16]->h = 256; // For UAE4ALL2
|
||||
SDL_modelist[17]->w = 320; SDL_modelist[17]->h = 262; // For UAE4ALL2
|
||||
SDL_modelist[18]->w = 640; SDL_modelist[18]->h = 262; // For UAE4ALL2
|
||||
SDL_modelist[19]->w = 320; SDL_modelist[19]->h = 270; // For UAE4ALL2
|
||||
SDL_modelist[20]->w = 640; SDL_modelist[20]->h = 270; // For UAE4ALL2
|
||||
SDL_modelist[21]->w = 320; SDL_modelist[21]->h = 216; // For UAE4ALL2
|
||||
SDL_modelist[22]->w = 640; SDL_modelist[22]->h = 216; // For UAE4ALL2
|
||||
SDL_modelist[23] = NULL;
|
||||
|
||||
SDL_VideoInit_1_3(NULL, 0);
|
||||
|
||||
|
||||
@@ -73,6 +73,8 @@ static int glContextLost = 0;
|
||||
static int showScreenKeyboardDeferred = 0;
|
||||
static const char * showScreenKeyboardOldText = "";
|
||||
static int showScreenKeyboardSendBackspace = 0;
|
||||
int SDL_ANDROID_IsScreenKeyboardShownFlag = 0;
|
||||
int SDL_ANDROID_TextInputFinished = 0;
|
||||
int SDL_ANDROID_VideoLinearFilter = 0;
|
||||
int SDL_ANDROID_VideoMultithreaded = 0;
|
||||
int SDL_ANDROID_VideoForceSoftwareMode = 0;
|
||||
@@ -240,12 +242,6 @@ int SDL_ANDROID_ToggleScreenKeyboardWithoutTextInput(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
volatile static textInputFinished = 0;
|
||||
void SDL_ANDROID_TextInputFinished()
|
||||
{
|
||||
textInputFinished = 1;
|
||||
};
|
||||
|
||||
#if SDL_VERSION_ATLEAST(1,3,0)
|
||||
#else
|
||||
extern int SDL_Flip(SDL_Surface *screen);
|
||||
@@ -254,6 +250,8 @@ extern SDL_Surface *SDL_GetVideoSurface(void);
|
||||
|
||||
void SDL_ANDROID_CallJavaShowScreenKeyboard(const char * oldText, char * outBuf, int outBufLen)
|
||||
{
|
||||
SDL_ANDROID_TextInputFinished = 0;
|
||||
SDL_ANDROID_IsScreenKeyboardShownFlag = 1;
|
||||
if( !outBuf )
|
||||
{
|
||||
showScreenKeyboardDeferred = 1;
|
||||
@@ -266,7 +264,6 @@ void SDL_ANDROID_CallJavaShowScreenKeyboard(const char * oldText, char * outBuf,
|
||||
}
|
||||
else
|
||||
{
|
||||
textInputFinished = 0;
|
||||
SDL_ANDROID_TextInputInit(outBuf, outBufLen);
|
||||
|
||||
if( SDL_ANDROID_VideoMultithreaded )
|
||||
@@ -283,9 +280,10 @@ void SDL_ANDROID_CallJavaShowScreenKeyboard(const char * oldText, char * outBuf,
|
||||
else
|
||||
(*JavaEnv)->CallVoidMethod( JavaEnv, JavaRenderer, JavaShowScreenKeyboard, (*JavaEnv)->NewStringUTF(JavaEnv, oldText), 0 );
|
||||
|
||||
while( !textInputFinished )
|
||||
while( !SDL_ANDROID_TextInputFinished )
|
||||
SDL_Delay(100);
|
||||
textInputFinished = 0;
|
||||
SDL_ANDROID_TextInputFinished = 0;
|
||||
SDL_ANDROID_IsScreenKeyboardShownFlag = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,9 +292,9 @@ void SDL_ANDROID_CallJavaHideScreenKeyboard()
|
||||
(*JavaEnv)->CallVoidMethod( JavaEnv, JavaRenderer, JavaHideScreenKeyboard );
|
||||
}
|
||||
|
||||
int SDL_ANDROID_CallJavaIsScreenKeyboardShown()
|
||||
int SDL_ANDROID_IsScreenKeyboardShown()
|
||||
{
|
||||
return (*JavaEnv)->CallIntMethod( JavaEnv, JavaRenderer, JavaIsScreenKeyboardShown );
|
||||
return SDL_ANDROID_IsScreenKeyboardShownFlag;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
|
||||
@@ -49,7 +49,7 @@ extern int SDL_ANDROID_UseGles2;
|
||||
extern int SDL_ANDROID_BYTESPERPIXEL;
|
||||
extern int SDL_ANDROID_BITSPERPIXEL;
|
||||
extern void SDL_ANDROID_TextInputInit(char * buffer, int len);
|
||||
extern void SDL_ANDROID_TextInputFinished();
|
||||
extern int SDL_ANDROID_TextInputFinished;
|
||||
extern SDL_Surface *SDL_CurrentVideoSurface;
|
||||
extern SDL_Rect SDL_ANDROID_ForceClearScreenRect;
|
||||
extern int SDL_ANDROID_ShowScreenUnderFinger;
|
||||
@@ -57,7 +57,8 @@ extern SDL_Rect SDL_ANDROID_ShowScreenUnderFingerRect, SDL_ANDROID_ShowScreenUnd
|
||||
extern int SDL_ANDROID_CallJavaSwapBuffers();
|
||||
extern void SDL_ANDROID_CallJavaShowScreenKeyboard(const char * oldText, char * outBuf, int outBufLen);
|
||||
extern void SDL_ANDROID_CallJavaHideScreenKeyboard();
|
||||
extern int SDL_ANDROID_CallJavaIsScreenKeyboardShown();
|
||||
extern int SDL_ANDROID_IsScreenKeyboardShown();
|
||||
extern int SDL_ANDROID_IsScreenKeyboardShownFlag;
|
||||
extern int SDL_ANDROID_drawTouchscreenKeyboard();
|
||||
extern void SDL_ANDROID_VideoContextLost();
|
||||
extern void SDL_ANDROID_VideoContextRecreated();
|
||||
|
||||
@@ -1090,7 +1090,7 @@ int SDLCALL SDL_HideScreenKeyboard(void *unused)
|
||||
|
||||
int SDLCALL SDL_IsScreenKeyboardShown(void *unused)
|
||||
{
|
||||
return SDL_ANDROID_CallJavaIsScreenKeyboardShown();
|
||||
return SDL_ANDROID_IsScreenKeyboardShown();
|
||||
}
|
||||
|
||||
int SDLCALL SDL_ToggleScreenKeyboard(void *unused)
|
||||
|
||||
@@ -42,8 +42,8 @@ void SDL_android_init_keymap(SDLKey *SDL_android_keymap)
|
||||
keymap[KEYCODE_7] = SDL_KEY(7);
|
||||
keymap[KEYCODE_8] = SDL_KEY(8);
|
||||
keymap[KEYCODE_9] = SDL_KEY(9);
|
||||
keymap[KEYCODE_STAR] = SDL_KEY(KP_DIVIDE);
|
||||
keymap[KEYCODE_POUND] = SDL_KEY(KP_MULTIPLY);
|
||||
keymap[KEYCODE_STAR] = SDL_KEY(KP_MULTIPLY);
|
||||
keymap[KEYCODE_POUND] = SDL_KEY(HASH);
|
||||
|
||||
keymap[KEYCODE_DPAD_UP] = SDL_KEY(UP);
|
||||
keymap[KEYCODE_DPAD_DOWN] = SDL_KEY(DOWN);
|
||||
@@ -52,10 +52,10 @@ void SDL_android_init_keymap(SDLKey *SDL_android_keymap)
|
||||
|
||||
keymap[KEYCODE_SOFT_LEFT] = SDL_KEY(KP_4);
|
||||
keymap[KEYCODE_SOFT_RIGHT] = SDL_KEY(KP_6);
|
||||
keymap[KEYCODE_ENTER] = SDL_KEY(RETURN); //SDL_KEY(KP_ENTER);
|
||||
keymap[KEYCODE_ENTER] = SDL_KEY(RETURN);
|
||||
|
||||
|
||||
keymap[KEYCODE_CLEAR] = SDL_KEY(BACKSPACE);
|
||||
keymap[KEYCODE_CLEAR] = SDL_KEY(CLEAR);
|
||||
keymap[KEYCODE_A] = SDL_KEY(A);
|
||||
keymap[KEYCODE_B] = SDL_KEY(B);
|
||||
keymap[KEYCODE_C] = SDL_KEY(C);
|
||||
@@ -86,10 +86,10 @@ void SDL_android_init_keymap(SDLKey *SDL_android_keymap)
|
||||
keymap[KEYCODE_PERIOD] = SDL_KEY(PERIOD);
|
||||
keymap[KEYCODE_TAB] = SDL_KEY(TAB);
|
||||
keymap[KEYCODE_SPACE] = SDL_KEY(SPACE);
|
||||
keymap[KEYCODE_DEL] = SDL_KEY(DELETE);
|
||||
keymap[KEYCODE_DEL] = SDL_KEY(BACKSPACE);
|
||||
keymap[KEYCODE_GRAVE] = SDL_KEY(GRAVE);
|
||||
keymap[KEYCODE_MINUS] = SDL_KEY(KP_MINUS);
|
||||
keymap[KEYCODE_PLUS] = SDL_KEY(KP_PLUS);
|
||||
keymap[KEYCODE_MINUS] = SDL_KEY(MINUS);
|
||||
keymap[KEYCODE_PLUS] = SDL_KEY(PLUS);
|
||||
keymap[KEYCODE_EQUALS] = SDL_KEY(EQUALS);
|
||||
keymap[KEYCODE_LEFT_BRACKET] = SDL_KEY(LEFTBRACKET);
|
||||
keymap[KEYCODE_RIGHT_BRACKET] = SDL_KEY(RIGHTBRACKET);
|
||||
@@ -97,7 +97,7 @@ void SDL_android_init_keymap(SDLKey *SDL_android_keymap)
|
||||
keymap[KEYCODE_SEMICOLON] = SDL_KEY(SEMICOLON);
|
||||
keymap[KEYCODE_APOSTROPHE] = SDL_KEY(APOSTROPHE);
|
||||
keymap[KEYCODE_SLASH] = SDL_KEY(SLASH);
|
||||
keymap[KEYCODE_AT] = SDL_KEY(KP_PERIOD);
|
||||
keymap[KEYCODE_AT] = SDL_KEY(AT);
|
||||
|
||||
keymap[KEYCODE_MEDIA_PLAY_PAUSE] = SDL_KEY(KP_2);
|
||||
keymap[KEYCODE_MEDIA_STOP] = SDL_KEY(HELP);
|
||||
|
||||
Reference in New Issue
Block a user