Merge branch 'master' of https://github.com/FWGS/xash3d-android-project
This commit is contained in:
commit
f1813fed8a
25 changed files with 235 additions and 192 deletions
|
@ -16,7 +16,8 @@
|
|||
|
||||
<activity android:name="in.celest.xash3d.LauncherActivity"
|
||||
android:label="@string/launcher_name"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize">
|
||||
<intent-filter>
|
||||
<action android:name="in.celest.xash3d.LauncherActivity"/>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
@ -24,8 +25,7 @@
|
|||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!--
|
||||
<activity android:name="in.celest.xash3d.SteamActivity"
|
||||
<!--<activity android:name="in.celest.xash3d.SteamActivity"
|
||||
android:label="Steam"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:launchMode="singleTask">
|
||||
|
@ -36,8 +36,7 @@
|
|||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
-->
|
||||
</activity>-->
|
||||
|
||||
<activity android:name="in.celest.xash3d.ShortcutActivity"
|
||||
android:label="@string/text_shortcut"
|
||||
|
@ -66,7 +65,7 @@
|
|||
-->
|
||||
<activity android:name="in.celest.xash3d.XashActivity"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="in.celest.xash3d.START" />
|
||||
|
@ -85,9 +84,7 @@
|
|||
<data android:scheme="package" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<!--
|
||||
<service android:name="in.celest.xash3d.SteamService" />
|
||||
-->
|
||||
<!--<service android:name="in.celest.xash3d.SteamService" />-->
|
||||
</application>
|
||||
|
||||
<!-- Some devices with Android 2.2 should support native activity, it was in unstable hidden API -->
|
||||
|
|
|
@ -3,14 +3,23 @@ AAPT=./../aapt
|
|||
DX=./../dx
|
||||
APKBUILDER=./../apkbuilder
|
||||
mkdir gen
|
||||
mkdir bin
|
||||
mkdir -p bin/classes
|
||||
|
||||
JAVAC=$JAVA_HOME/bin/javac
|
||||
|
||||
if [ -z "$JAVA_HOME" ]; then
|
||||
export JAVAC=$(which javac)
|
||||
fi
|
||||
|
||||
: ${OUTPUT:=$1}
|
||||
: ${OUTPUT:=bin/xash3d-signed.apk}
|
||||
sh gen-version.sh test build
|
||||
rm assets/extras.pak
|
||||
python2.7 makepak.py xash-extras assets/extras.pak
|
||||
$AAPT package -m -J gen/ --rename-manifest-package in.celest.xash3d.hl -M AndroidManifest.xml -S test/res -I $ANDROID_JAR
|
||||
$JAVA_HOME/bin/javac -d bin/classes -s bin/classes -cp $ANDROID_JAR gen/in/celest/xash3d/hl/R.java src/in/celest/xash3d/*.java
|
||||
$JAVAC -d bin/classes -s bin/classes -cp $ANDROID_JAR gen/in/celest/xash3d/hl/R.java src/in/celest/xash3d/*.java
|
||||
$DX --dex --output=bin/classes.dex bin/classes/
|
||||
/mnt/app/apktool/aapt package -f -M test/AndroidManifest.xml -S test/res -I $ANDROID_JAR -F bin/xash3d.apk.unaligned
|
||||
$AAPT package -f -M test/AndroidManifest.xml -S test/res -I $ANDROID_JAR -F bin/xash3d.apk.unaligned
|
||||
zip bin/xash3d.apk.unaligned assets/*
|
||||
$APKBUILDER bin/xash3d.apk -u -nf libs/ -rj libs -f bin/classes.dex -z bin/xash3d.apk.unaligned
|
||||
java -jar /mnt/app/apktool/signapk.jar /mnt/app/apktool/testkey.x509.pem /mnt/app/apktool/testkey.pk8 bin/xash3d.apk bin/xash3d-signed.apk
|
||||
java -jar /mnt/app/apktool/signapk.jar /mnt/app/apktool/testkey.x509.pem /mnt/app/apktool/testkey.pk8 bin/xash3d.apk $OUTPUT
|
||||
|
|
|
@ -6,7 +6,6 @@ echo -n '<b>Version information:</b> ' $*_endl| sed -e s/_endl/'\\n'/ >> res/val
|
|||
echo -n '<b>android:</b>' $(git log --abbrev-commit --pretty=oneline -1) _endl\
|
||||
'<b>engine:</b>' $(cd jni/src/Xash3D/*/;git log --abbrev-commit --pretty=oneline -1) _endl\
|
||||
'<b>hlsdk:</b>' $(cd jni/src/hlsdk-xash3d/;git log --abbrev-commit --pretty=oneline -1) _endl\
|
||||
'<b>SDL2:</b>' $(cd jni/src/SDL2/*/;git log --abbrev-commit --pretty=oneline -1) _endl\
|
||||
'<b>extras:</b>' $(cd xash-extras/;git log --abbrev-commit --pretty=oneline -1) _endl\
|
||||
'<b>nanogl:</b>' $(cd jni/src/NanoGL/*/;git log --abbrev-commit --pretty=oneline -1)_endl\
|
||||
| sed -e s/\'//g -e s/_endl/'\\n'/g >> res/values/git-rev.xml
|
||||
|
|
|
@ -10,6 +10,9 @@ else
|
|||
APP_PLATFORM := android-9
|
||||
endif
|
||||
|
||||
# if non-zero, works only if single ABI selected
|
||||
XASH_THREAD_NUM ?= 0
|
||||
|
||||
|
||||
CFLAGS_OPT := -O3 -fomit-frame-pointer -ggdb -funsafe-math-optimizations -ftree-vectorize -fgraphite-identity -floop-interchange -funsafe-loop-optimizations -finline-limit=256 -pipe
|
||||
CFLAGS_OPT_ARM := -mthumb -mfpu=neon -mcpu=cortex-a9 -pipe -mvectorize-with-neon-quad -DVECTORIZE_SINCOS -fPIC -DHAVE_EFFICIENT_UNALIGNED_ACCESS
|
||||
|
|
|
@ -1,73 +0,0 @@
|
|||
LOCAL_PATH := $(call my-dir)/SDL-mirror
|
||||
|
||||
###########################
|
||||
#
|
||||
# SDL shared library
|
||||
#
|
||||
###########################
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := SDL2
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
$(subst $(LOCAL_PATH)/,, \
|
||||
$(wildcard $(LOCAL_PATH)/src/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/audio/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
|
||||
$(LOCAL_PATH)/src/atomic/SDL_atomic.c \
|
||||
$(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
|
||||
$(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/cpuinfo/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/dynapi/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/events/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/file/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/haptic/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/haptic/dummy/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/render/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/render/*/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/stdlib/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/thread/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/thread/pthread/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/timer/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/timer/unix/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/video/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/video/android/*.c) \
|
||||
$(wildcard $(LOCAL_PATH)/src/test/*.c))
|
||||
|
||||
ifneq ($(XASH3D_CONFIG),)
|
||||
include $(XASH3D_CONFIG)
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
|
||||
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
###########################
|
||||
#
|
||||
# SDL static library
|
||||
#
|
||||
###########################
|
||||
|
||||
LOCAL_MODULE := SDL2_static
|
||||
|
||||
LOCAL_MODULE_FILENAME := libSDL2
|
||||
|
||||
LOCAL_SRC_FILES += $(subst $(LOCAL_PATH)/,,$(LOCAL_PATH)/src/main/android/SDL_android_main.c)
|
||||
|
||||
LOCAL_LDLIBS :=
|
||||
LOCAL_EXPORT_LDLIBS := -Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
|
@ -1 +0,0 @@
|
|||
Place here SDL2 source code, if you want build SDL2 version of Xash3D Android. Note that this is neither maintained nor supported officially anymore.
|
|
@ -1 +1 @@
|
|||
Subproject commit 6c4173633cbb079720f91a0e6a73336af0b9c573
|
||||
Subproject commit d0a24c0dc5d142a87c61bdf3ad88039914c8afe4
|
|
@ -11,3 +11,65 @@ endif
|
|||
ifeq ($(TARGET_ARCH_ABI),x86)
|
||||
LOCAL_CFLAGS += $(CFLAGS_OPT_X86)
|
||||
endif
|
||||
ifneq ($(XASH_THREAD_NUM),0)
|
||||
ifneq (,$(findstring $(LOCAL_MODULE),nanogl server client))
|
||||
#LOCAL_LDFLAGS += -fopenmp -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
LOCAL_CFLAGS += -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
endif
|
||||
LOCAL_LDFLAGS += -fopenmp -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
# this works only if single ABI selected
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_studio.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/cl_game.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/cl_frame.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/cl_parse.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_warp.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
#obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/cl_main.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
#obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/cl_tent.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/cl_events.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_sprite.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_image.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_cull.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
#obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_rpart.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
#obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_beams.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_rlight.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
#obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_rsurf.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_rmain.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
|
||||
#obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/s_dsp.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
#obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/s_utils.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/s_vox.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/s_mouth.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/s_stream.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/s_load.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
#obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/s_mix.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_draw.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/client/gl_decals.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/soundlib/snd_wav.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/imagelib/img_tga.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/imagelib/img_wad.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/imagelib/img_bmp.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/imagelib/img_quant.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
#obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/console.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/net_buffer.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/net_encode.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/mod_studio.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/pm_trace.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/pm_surface.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/cvar.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/cmd.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/network.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/crtlib.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/crclib.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/filesystem.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/infostring.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/gamma.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/mathlib.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/matrixlib.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/common/touch.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/server/sv_move.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/server/sv_pmove.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/server/sv_world.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/server/sv_phys.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
obj/local/$(TARGET_ARCH_ABI)/objs/xash/server/sv_frame.o: override PRIVATE_CC = $(TARGET_CC) -ftree-parallelize-loops=$(XASH_THREAD_NUM)
|
||||
endif
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||
android:text="https://sdlash3d.github.io"
|
||||
android:text="https://FWGS.github.io"
|
||||
android:id="@+id/textView9"
|
||||
android:autoText="false"
|
||||
android:autoLink="web"
|
||||
|
|
|
@ -14,20 +14,19 @@
|
|||
<string name="shortcut_name">Kurzbefehl Name</string>
|
||||
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="about_copyright">SDLash3D steht in keinem Zusammenhang zu Valve oder einem ihrer Partners. All copyrights reserved to their respective owners.</string>
|
||||
<string name="about_authors">Portierung auf Android by SDLash3D team: \n
|
||||
<string name="about_copyright">FWGS steht in keinem Zusammenhang zu Valve oder einem ihrer Partners. All copyrights reserved to their respective owners.</string>
|
||||
<string name="about_authors">Portierung auf Android by FWGS team: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
||||
Spezieller Dank an:\n
|
||||
• Uncle Mike für Xash3D engine\n
|
||||
• Valve for Half-Life\n
|
||||
• libSDL2 developers.\n</string>
|
||||
• Valve for Half-Life\n</string>
|
||||
<string name="about_links">Folge uns auf:\n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_button">Über Xash3D Android</string>
|
||||
<string name="create_shortcut_button">mod Kurzbefehl ersellen</string>
|
||||
<string name="select_folder">(auswahl)</string>
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
<string name="pkgname">Nombre del paquete del mod (sólo expertos)</string>
|
||||
<string name="shortcut_name">Nombre del acceso directo</string>
|
||||
|
||||
<string name="about_copyright">SDLash3D no está afiliado con Valve o cualquiera de sus socios. Todos los derechos reservados a sus respectivos dueños.</string>
|
||||
<string name="about_authors">Adaptación para Android por SDLash3D team: \n
|
||||
<string name="about_copyright">FWGS no está afiliado con Valve o cualquiera de sus socios. Todos los derechos reservados a sus respectivos dueños.</string>
|
||||
<string name="about_authors">Adaptación para Android por FWGS team: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
@ -22,11 +22,11 @@
|
|||
Especial agradecimiento a:\n
|
||||
• Uncle Mike por Xash3D engine\n
|
||||
• Valve por Half-Life\n
|
||||
• Desarrolladores de libSDL2.\n</string>
|
||||
</string>
|
||||
<string name="about_links">Siguenos en: \n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_button">Acerca de Xash3D Android</string>
|
||||
<string name="create_shortcut_button">Crear acceso directo del mod</string>
|
||||
<string name="select_folder">(seleccionar)</string>
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
<string name="gamedir">مسیر مود</string>
|
||||
<string name="pkgname">نام بسته مود (فقط برای حرفه ای ها):</string>
|
||||
<string name="shortcut_name">نام میانبر</string>
|
||||
<string name="about_copyright">یا شرکای آن ندارد. تمامی حقوق کپی برای صاحبان هر کدام محفوظ است. Valve هیچ نسبتی با SDLash3D</string>
|
||||
<string name="about_authors">:SDLash3D پورت شده به اندروید توسط تیم \n • a1batross\n • mittorn \n • nicknekit.\n تشکر ویژه از:\n • Xash3Dبرای موتور Uncle Mike\n • Half-Life برای Valve\n • libSDL2 توسعه دهندگان.\n</string>
|
||||
<string name="about_links">ما را دنبال کنید در :\n •<a href="https://vk.com/xashdroid">VK</a>\n•<a href="http://moddb.com/game/xash3d-android">ModDB</a>\n•<a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
<string name="about_copyright">یا شرکای آن ندارد. تمامی حقوق کپی برای صاحبان هر کدام محفوظ است. Valve هیچ نسبتی با FWGS</string>
|
||||
<string name="about_authors">:FWGS پورت شده به اندروید توسط تیم \n • a1batross\n • mittorn \n • nicknekit.\n تشکر ویژه از:\n • Xash3Dبرای موتور Uncle Mike\n • Half-Life برای Valve\n</string>
|
||||
<string name="about_links">ما را دنبال کنید در :\n •<a href="https://vk.com/xashdroid">VK</a>\n•<a href="http://moddb.com/game/xash3d-android">ModDB</a>\n•<a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_button">Xash3D Android درباره</string>
|
||||
<string name="create_shortcut_button">ایجاد میانبر مود</string>
|
||||
<string name="select_folder">(انتخاب)</string>
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
<string name="gamedir">모드 디렉토리</string>
|
||||
<string name="pkgname">모드 패키지 이름(고급설정)</string>
|
||||
<string name="shortcut_name">바로가기 이름</string>
|
||||
<string name="about_copyright">우리 SDLash3D는 밸브와 상업적으로 관련이 없습니다. 모든 저작권은 소유주로 보류되어있음을 알립니다..</string>
|
||||
<string name="about_authors">안드로이드 이식 by SDLash3D팀: \n
|
||||
<string name="about_copyright">우리 FWGS는 밸브와 상업적으로 관련이 없습니다. 모든 저작권은 소유주로 보류되어있음을 알립니다..</string>
|
||||
<string name="about_authors">안드로이드 이식 by FWGS팀: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
@ -22,12 +22,11 @@
|
|||
특별히 감사드리는 것들:\n
|
||||
• 마이클삼촌의 XASH3D엔진\n
|
||||
• 밸브의 하프라이프\n
|
||||
• libSDL2 개발자분들\n
|
||||
• 한글화 byAIC from X3A NaverCafe</string>
|
||||
<string name="about_links">\n
|
||||
여기서 우리를: • <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">모드디비</a>\n
|
||||
• <a href="https://github.com/SDLash3D">깃허브</a>
|
||||
• <a href="https://github.com/FWGS">깃허브</a>
|
||||
</string>
|
||||
<string name="about_button">Xash3D 안드로이드 정보</string>
|
||||
<string name="create_shortcut_button">바로가기 만들기</string>
|
||||
|
|
|
@ -13,20 +13,19 @@
|
|||
<string name="pkgname">Nome do pacote de Mod (apenas expecialistas)</string>
|
||||
<string name="shortcut_name">Nome do atalho</string>
|
||||
|
||||
<string name="about_copyright">SDLash3D não é afiliado com a Valve ou qualquer um dos seus parceiros. Todos os direitos autorais reservados aos respectivos proprietários.</string>
|
||||
<string name="about_authors">Porta para android pelo time SDLash3D: \n
|
||||
<string name="about_copyright">FWGS não é afiliado com a Valve ou qualquer um dos seus parceiros. Todos os direitos autorais reservados aos respectivos proprietários.</string>
|
||||
<string name="about_authors">Porta para android pelo time FWGS: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
||||
Agradecimentos especiais para:\n
|
||||
• Uncle Mike pelo motor Xash3D\n
|
||||
• Valve pelo Half-Life\n
|
||||
• Desenvolvedores libSDL2.\n</string>
|
||||
• Valve pelo Half-Life\n</string>
|
||||
<string name="about_links">Siga-nos no:\n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_button">Sobre Android Xash3D</string>
|
||||
<string name="create_shortcut_button">Criar atalho para o mod</string>
|
||||
<string name="select_folder">(selecionar)</string>
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
<string name="shortcut_name">Название ярлыка</string>
|
||||
|
||||
<!--<string name="about_main" translatable="false">Xash3D Android</string>-->
|
||||
<string name="about_copyright">SDLash3D не связан с Valve или с любыми из их партнеров. Все авторские права принадлежат их соотвественным обладателям.</string>
|
||||
<string name="about_copyright">FWGS не связан с Valve или с любыми из их партнеров. Все авторские права принадлежат их соотвественным обладателям.</string>
|
||||
<!-- Seems Android skips any line breaks and tabs here. -->
|
||||
<string name="about_authors">
|
||||
Порт на Android осуществлен командой SDLash3D:\n
|
||||
Порт на Android осуществлен командой FWGS:\n
|
||||
• a1batross\n
|
||||
• mittorn\n
|
||||
• nicknekit\n
|
||||
|
@ -31,13 +31,12 @@
|
|||
Особые благодарности:\n
|
||||
• Дяде Мише за Xash3D\n
|
||||
• Valve за Half-Life\n
|
||||
• Разработчикам libSDL2
|
||||
</string>
|
||||
<string name="about_links">
|
||||
Подпишись на нас: \n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a>
|
||||
• <a href="https://github.com/FWGS">GitHub</a>
|
||||
</string>
|
||||
<string name="about_button">О Xash3D Android</string>
|
||||
<string name="create_shortcut_button">Создать ярлык</string>
|
||||
|
|
|
@ -13,20 +13,19 @@
|
|||
<string name="pkgname">Mod\'un paket adı (uzmanlar için)</string>
|
||||
<string name="shortcut_name">Kısayol adı</string>
|
||||
|
||||
<string name="about_copyright">SDLash3D, Valve veya Valve\'ın herhangi bir partnerine bağlı değildir. Tüm telif hakları kendi sahiplerine aittir.</string>
|
||||
<string name="about_authors">SDLash3D takımından Android Port\'u: \n
|
||||
<string name="about_copyright">FWGS, Valve veya Valve\'ın herhangi bir partnerine bağlı değildir. Tüm telif hakları kendi sahiplerine aittir.</string>
|
||||
<string name="about_authors">FWGS takımından Android Port\'u: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
||||
Özel teşekkürler:\n
|
||||
• Uncle Mike for Xash3D engine\n
|
||||
• Valve for Half-Life\n
|
||||
• libSDL2 developers.\n</string>
|
||||
• Valve for Half-Life\n/string>
|
||||
<string name="about_links">Bizi buralardan takip edin: \n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_button">Xash3D Android Hakkında</string>
|
||||
<string name="create_shortcut_button">Mod kısayolu oluştur</string>
|
||||
<string name="select_folder">(seç)</string>
|
||||
|
|
|
@ -12,20 +12,19 @@
|
|||
<string name="gamedir">Каталог мода</string>
|
||||
<string name="pkgname">Пакет мода (тільки для експертів)</string>
|
||||
<string name="shortcut_name">Назва ярлика</string>
|
||||
<string name="about_copyright">SDLash3D не пов\'язаний з Valve або з будь-якими з їх партнерів. Всі авторські права належать їх відповідним власникам.</string>
|
||||
<string name="about_authors">Порт на Android здійснений командою SDLash3D:\n
|
||||
<string name="about_copyright">FWGS не пов\'язаний з Valve або з будь-якими з їх партнерів. Всі авторські права належать їх відповідним власникам.</string>
|
||||
<string name="about_authors">Порт на Android здійснений командою FWGS:\n
|
||||
• a1batross\n
|
||||
• mittorn\n
|
||||
• nicknekit\n
|
||||
|
||||
Особливі подяки:\n
|
||||
• Дяде Мише за Xash3D\n
|
||||
• Valve за Half-Life\n
|
||||
• Розробникам libSDL2.\n</string>
|
||||
• Valve за Half-Life\n</string>
|
||||
<string name="about_links">Слідуйте за нами в:\n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_button">О Xash3D Android</string>
|
||||
<string name="create_shortcut_button">Створити ярлик мода</string>
|
||||
<string name="select_folder">(вибрати)</string>
|
||||
|
|
|
@ -12,20 +12,19 @@
|
|||
<string name="gamedir">Mod 目录</string>
|
||||
<string name="pkgname">Mod 资源包名字(高级)</string>
|
||||
<string name="shortcut_name">快捷方式名字</string>
|
||||
<string name="about_copyright">SDLash3D不隶属于Valve或其合作伙伴。 版权归各自所有。</string>
|
||||
<string name="about_authors">由SDLash3D团队移植到Android系统,成员: \n
|
||||
<string name="about_copyright">FWGS不隶属于Valve或其合作伙伴。 版权归各自所有。</string>
|
||||
<string name="about_authors">由FWGS团队移植到Android系统,成员: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
||||
特别感谢:\n
|
||||
• Uncle Mike 制作的 Xash3D 引擎\n
|
||||
• Valve 制作的 《半条命》\n
|
||||
• libSDL2 开发商\n</string>
|
||||
• Valve 制作的 《半条命》\</string>
|
||||
<string name="about_links">联系我们: \n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a></string>
|
||||
• <a href="https://github.com/FWGS">GitHub</a></string>
|
||||
<string name="about_button">关于 Xash3D Android</string>
|
||||
<string name="create_shortcut_button">创建mod快捷方式</string>
|
||||
<string name="select_folder">(选择)</string>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
<string name="shortcut_name">Shortcut name</string>
|
||||
|
||||
<string name="about_main" translatable="false">Xash3D Android</string>
|
||||
<string name="about_copyright">SDLash3D is not affiliated with Valve or any of their partners. All copyrights reserved to their respective owners.</string>
|
||||
<string name="about_copyright">FWGS is not affiliated with Valve or any of their partners. All copyrights reserved to their respective owners.</string>
|
||||
<!-- Seems Android skips any line breaks and tabs here. -->
|
||||
<string name="about_authors">
|
||||
Port to Android by SDLash3D team: \n
|
||||
Port to Android by FWGS team: \n
|
||||
• a1batross\n
|
||||
• mittorn \n
|
||||
• nicknekit.\n
|
||||
|
@ -28,13 +28,12 @@
|
|||
Special thanks to:\n
|
||||
• Uncle Mike for Xash3D engine\n
|
||||
• Valve for Half-Life\n
|
||||
• libSDL2 developers.\n
|
||||
</string>
|
||||
<string name="about_links">
|
||||
Follow us in: \n
|
||||
• <a href="https://vk.com/xashdroid">VK</a>\n
|
||||
• <a href="http://moddb.com/game/xash3d-android">ModDB</a>\n
|
||||
• <a href="https://github.com/SDLash3D">GitHub</a>
|
||||
• <a href="https://github.com/FWGS">GitHub</a>
|
||||
</string>
|
||||
<string name="about_button">About</string>
|
||||
<string name="create_shortcut_button">Create mod shortcut</string>
|
||||
|
|
|
@ -18,12 +18,14 @@ public class InstallReceiver extends BroadcastReceiver {
|
|||
}
|
||||
public static SharedPreferences mPref = null;
|
||||
private static final int PAK_VERSION = 5;
|
||||
public static void extractPAK(Context context, Boolean force) {
|
||||
public static synchronized void extractPAK(Context context, Boolean force) {
|
||||
InputStream is = null;
|
||||
FileOutputStream os = null;
|
||||
try {
|
||||
if( mPref == null )
|
||||
mPref = context.getSharedPreferences("engine", 0);
|
||||
synchronized( mPref )
|
||||
{
|
||||
if( mPref.getInt( "pakversion", 0 ) == PAK_VERSION && !force )
|
||||
return;
|
||||
String path = context.getFilesDir().getPath()+"/extras.pak";
|
||||
|
@ -40,6 +42,7 @@ public class InstallReceiver extends BroadcastReceiver {
|
|||
SharedPreferences.Editor editor = mPref.edit();
|
||||
editor.putInt( "pakversion", PAK_VERSION );
|
||||
editor.commit();
|
||||
}
|
||||
} catch( Exception e )
|
||||
{
|
||||
Log.e( TAG, "Failed to extract PAK:" + e.toString() );
|
||||
|
|
|
@ -127,6 +127,31 @@ public class LauncherActivity extends Activity {
|
|||
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, list);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_item);
|
||||
pixelSpinner.setAdapter(adapter);
|
||||
Button selectFolderButton = ( Button ) findViewById( R.id.button_select );
|
||||
selectFolderButton.setOnClickListener(new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
selectFolder(v);
|
||||
}
|
||||
});
|
||||
((Button)findViewById( R.id.button_launch )).setOnClickListener(new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
startXash(v);
|
||||
}
|
||||
});
|
||||
((Button)findViewById( R.id.button_shortcut )).setOnClickListener(new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
createShortcut(v);
|
||||
}
|
||||
});
|
||||
((Button)findViewById( R.id.button_about )).setOnClickListener(new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
aboutXash(v);
|
||||
}
|
||||
});
|
||||
useVolume.setChecked(mPref.getBoolean("usevolume",true));
|
||||
checkUpdates.setChecked(mPref.getBoolean("check_updates",true));
|
||||
updateToBeta.setChecked(mPref.getBoolean("check_betas", false));
|
||||
|
|
|
@ -39,6 +39,8 @@ public class XashActivity extends Activity {
|
|||
public static int mPixelFormat;
|
||||
protected static ViewGroup mLayout;
|
||||
public static JoystickHandler handler;
|
||||
public static ImmersiveMode mImmersiveMode;
|
||||
public static boolean keyboardVisible = false;
|
||||
|
||||
// Joystick constants
|
||||
public final static byte JOY_HAT_CENTERED = 0; // bitmasks for hat current status
|
||||
|
@ -58,7 +60,7 @@ public class XashActivity extends Activity {
|
|||
public static SharedPreferences mPref = null;
|
||||
private static boolean mUseVolume;
|
||||
private static boolean mEnableImmersive;
|
||||
private static View mDecorView;
|
||||
public static View mDecorView;
|
||||
|
||||
// Audio
|
||||
private static Thread mAudioThread;
|
||||
|
@ -95,7 +97,7 @@ public class XashActivity extends Activity {
|
|||
mSurface = new EngineSurface(getApplication());
|
||||
|
||||
if( sdk < 12 )
|
||||
handler = new JoystickHandler_stub();
|
||||
handler = new JoystickHandler();
|
||||
else
|
||||
handler = new JoystickHandler_v12();
|
||||
handler.init();
|
||||
|
@ -159,6 +161,8 @@ public class XashActivity extends Activity {
|
|||
|
||||
// Immersive Mode is available only at >KitKat
|
||||
mEnableImmersive = (sdk >= 19 && mPref.getBoolean("immersive_mode", true));
|
||||
if( mEnableImmersive )
|
||||
mImmersiveMode = new ImmersiveMode_v19();
|
||||
mDecorView = getWindow().getDecorView();
|
||||
}
|
||||
|
||||
|
@ -180,16 +184,8 @@ public class XashActivity extends Activity {
|
|||
{
|
||||
super.onWindowFocusChanged(hasFocus);
|
||||
|
||||
if( mEnableImmersive && hasFocus )
|
||||
{
|
||||
mDecorView.setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
|
||||
| View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
|
||||
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
||||
}
|
||||
if( mImmersiveMode != null )
|
||||
mImmersiveMode.apply();
|
||||
}
|
||||
|
||||
public static native int nativeInit(Object arguments);
|
||||
|
@ -299,7 +295,7 @@ public class XashActivity extends Activity {
|
|||
case KeyEvent.KEYCODE_DPAD_RIGHT: val = JOY_HAT_RIGHT; break;
|
||||
case KeyEvent.KEYCODE_DPAD_DOWN: val = JOY_HAT_DOWN; break;
|
||||
case KeyEvent.KEYCODE_DPAD_LEFT: val = JOY_HAT_LEFT; break;
|
||||
default: return false;
|
||||
default: return performEngineKeyEvent( action, keyCode, event );
|
||||
}
|
||||
|
||||
if(action == KeyEvent.ACTION_DOWN)
|
||||
|
@ -348,21 +344,9 @@ public class XashActivity extends Activity {
|
|||
}
|
||||
else
|
||||
{
|
||||
if (action == KeyEvent.ACTION_DOWN)
|
||||
{
|
||||
if (event.isPrintingKey() || keyCode == 62)// space is printing too
|
||||
XashActivity.nativeString(String.valueOf((char) event.getUnicodeChar()));
|
||||
|
||||
XashActivity.nativeKey(1, keyCode);
|
||||
|
||||
if( performEngineKeyEvent( action, keyCode, event ) )
|
||||
return true;
|
||||
}
|
||||
else if (action == KeyEvent.ACTION_UP)
|
||||
{
|
||||
XashActivity.nativeKey(0, keyCode);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( event.getAction() == KeyEvent.ACTION_DOWN )
|
||||
|
@ -373,6 +357,11 @@ public class XashActivity extends Activity {
|
|||
return true;
|
||||
}
|
||||
|
||||
return performEngineKeyEvent( action, keyCode, event );
|
||||
}
|
||||
|
||||
public static boolean performEngineKeyEvent( int action, int keyCode, KeyEvent event)
|
||||
{
|
||||
if( action == KeyEvent.ACTION_DOWN )
|
||||
{
|
||||
if( event.isPrintingKey() || keyCode == 62 )// space is printing too
|
||||
|
@ -460,11 +449,17 @@ public class XashActivity extends Activity {
|
|||
mTextEdit.requestFocus();
|
||||
|
||||
imm.showSoftInput(mTextEdit, 0);
|
||||
keyboardVisible = true;
|
||||
if( XashActivity.mImmersiveMode != null )
|
||||
XashActivity.mImmersiveMode.apply();
|
||||
}
|
||||
else
|
||||
{
|
||||
mTextEdit.setVisibility(View.GONE);
|
||||
imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);
|
||||
keyboardVisible = false;
|
||||
if( XashActivity.mImmersiveMode != null )
|
||||
XashActivity.mImmersiveMode.apply();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -500,7 +495,7 @@ class EngineSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|||
View.OnKeyListener {
|
||||
|
||||
// This is what Xash3D runs in. It invokes main(), eventually
|
||||
private Thread mEngThread;
|
||||
private static Thread mEngThread = null;
|
||||
|
||||
// EGL private objects
|
||||
private EGLContext mEGLContext;
|
||||
|
@ -896,10 +891,14 @@ class AndroidBug5497Workaround {
|
|||
if (heightDifference > (usableHeightSansKeyboard/4)) {
|
||||
// keyboard probably just became visible
|
||||
frameLayoutParams.height = usableHeightSansKeyboard - heightDifference;
|
||||
XashActivity.keyboardVisible = true;
|
||||
} else {
|
||||
// keyboard probably just became hidden
|
||||
frameLayoutParams.height = usableHeightSansKeyboard;
|
||||
XashActivity.keyboardVisible = false;
|
||||
}
|
||||
if( XashActivity.mImmersiveMode != null )
|
||||
XashActivity.mImmersiveMode.apply();
|
||||
mChildOfContent.requestLayout();
|
||||
usableHeightPrevious = usableHeightNow;
|
||||
}
|
||||
|
@ -913,7 +912,7 @@ class AndroidBug5497Workaround {
|
|||
|
||||
}
|
||||
|
||||
interface JoystickHandler
|
||||
/*interface JoystickHandler
|
||||
{
|
||||
public int getSource(KeyEvent event);
|
||||
public int getSource(MotionEvent event);
|
||||
|
@ -921,8 +920,8 @@ interface JoystickHandler
|
|||
public boolean isGamepadButton(int keyCode);
|
||||
public String keyCodeToString(int keyCode);
|
||||
public void init();
|
||||
}
|
||||
class JoystickHandler_stub implements JoystickHandler
|
||||
}*/
|
||||
class JoystickHandler
|
||||
{
|
||||
public int getSource(KeyEvent event)
|
||||
{
|
||||
|
@ -949,7 +948,7 @@ class JoystickHandler_stub implements JoystickHandler
|
|||
}
|
||||
}
|
||||
|
||||
class JoystickHandler_v12 implements JoystickHandler
|
||||
class JoystickHandler_v12 extends JoystickHandler
|
||||
{
|
||||
|
||||
|
||||
|
@ -1025,3 +1024,30 @@ class JoystickHandler_v12 implements JoystickHandler
|
|||
|
||||
}
|
||||
|
||||
class ImmersiveMode
|
||||
{
|
||||
void apply()
|
||||
{
|
||||
//stub
|
||||
}
|
||||
}
|
||||
|
||||
class ImmersiveMode_v19 extends ImmersiveMode
|
||||
{
|
||||
@Override
|
||||
void apply()
|
||||
{
|
||||
if( !XashActivity.keyboardVisible )
|
||||
XashActivity.mDecorView.setSystemUiVisibility(
|
||||
0x00000100 // View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| 0x00000200 // View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
| 0x00000400 // View.SYSTEM_UI_FLAG_LAYOUT_FULSCREEN
|
||||
| 0x00000002 // View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hide nav bar
|
||||
| 0x00000004 // View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bar
|
||||
| 0x00001000 // View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
||||
);
|
||||
else
|
||||
XashActivity.mDecorView.setSystemUiVisibility( 0 );
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<activity android:name="in.celest.xash3d.LauncherActivity"
|
||||
android:label="@string/launcher_name_test"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
>
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize">
|
||||
<intent-filter>
|
||||
<action android:name="in.celest.xash3d.LauncherActivity"/>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
@ -75,7 +75,7 @@
|
|||
</activity>-->
|
||||
<activity android:name="in.celest.xash3d.XashActivity"
|
||||
android:screenOrientation="sensorLandscape"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|screenLayout|fontScale|uiMode|orientation|screenSize|smallestScreenSize"
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
|
|
|
@ -480,6 +480,7 @@ public class SteamService extends Service
|
|||
// called on every char in line until return true
|
||||
private boolean processPartial( String str ) throws CancelException, IOException
|
||||
{
|
||||
//printText(str);
|
||||
{
|
||||
if( str.contains( "Steam>" ) )
|
||||
{
|
||||
|
@ -529,7 +530,7 @@ public class SteamService extends Service
|
|||
processInput.write( (passwd + '\n').getBytes() );
|
||||
return true;
|
||||
}
|
||||
if( str.startsWith("Steam Guard code:" ))
|
||||
if( str.startsWith("Steam Guard code:" )|| str.startsWith("Two-factor code:") )
|
||||
{
|
||||
String passwd = promptDialog("Steam Guard code", "Please enter your SteamGuard code", true);
|
||||
if( passwd == null )
|
Loading…
Add table
Reference in a new issue