SDL2: custom activity that overrides SDLActivity

This commit is contained in:
Sergii Pylypenko
2022-01-02 00:11:31 +02:00
parent a235249f57
commit 919bf9a378
16 changed files with 179 additions and 100 deletions

1
project/jni/SDL2/include Symbolic link
View File

@@ -0,0 +1 @@
../sdl2/include

View File

@@ -6,7 +6,9 @@ LOCAL_MODULE := application
APPDIR := $(shell readlink $(LOCAL_PATH)/src)
LOCAL_SHARED_LIBRARIES := sdl-$(SDL_VERSION) $(filter-out $(APP_AVAILABLE_STATIC_LIBS), $(COMPILED_LIBRARIES))
SDL_LIB := $(if $(filter 1.2, $(SDL_VERSION)), sdl-1.2, SDL2)
LOCAL_SHARED_LIBRARIES := $(SDL_LIB_NAME) $(filter-out $(APP_AVAILABLE_STATIC_LIBS), $(COMPILED_LIBRARIES))
LOCAL_STATIC_LIBRARIES := $(filter $(APP_AVAILABLE_STATIC_LIBS), $(COMPILED_LIBRARIES))
@@ -45,7 +47,7 @@ LOCAL_CFLAGS += $(foreach D, $(LOCAL_C_INCLUDES), -iquote$(D))
LOCAL_C_INCLUDES :=
endif
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../sdl-$(SDL_VERSION)/include
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../$(SDL_LIB_NAME)/include
LOCAL_C_INCLUDES += $(foreach L, $(COMPILED_LIBRARIES), $(LOCAL_PATH)/../$(L)/include)
LOCAL_CFLAGS += $(APPLICATION_ADDITIONAL_CFLAGS)

View File

@@ -36,21 +36,21 @@ AppDataDownloadUrl="!!SSL certificates|:ca-certificates.crt:ca-certificates.crt"
ResetSdlConfigForThisVersion=y
# Delete application data files when upgrading (specify file/dir paths separated by spaces)
DeleteFilesOnUpgrade="libsdl-DownloadFinished-0.flag"
DeleteFilesOnUpgrade=""
# Here you may type readme text, which will be shown during startup. Format is:
# Text in English, use \\\\n to separate lines (that's four backslashes)^de:Text in Deutsch^ru:Text in Russian^button:Button that will open some URL:http://url-to-open/
ReadmeText='^You may press "Home" now - the data will be downloaded in background'
# libSDL version to use (1.2/1.3/2.0)
LibSdlVersion=1.2
# libSDL version to use (1.2/2)
LibSdlVersion=2
# Specify screen orientation: (v)ertical/(p)ortrait or (h)orizontal/(l)andscape
ScreenOrientation=h
# Video color depth - 16 BPP is the fastest and supported for all modes, 24 bpp is supported only
# with SwVideoMode=y, SDL_OPENGL mode supports everything. (16)/(24)/(32)
VideoDepthBpp=16
VideoDepthBpp=24
# Enable OpenGL depth buffer (needed only for 3-d applications, small speed decrease) (y) or (n)
NeedDepthBuffer=n
@@ -60,14 +60,14 @@ NeedStencilBuffer=n
# Use GLES 2.x context
# you need this option only if you're developing 3-d app (y) or (n)
NeedGles2=n
NeedGles2=y
# Use GLES 3.x context
# you need this option only if you're developing 3-d app (y) or (n)
NeedGles3=
NeedGles3=n
# Use gl4es library for provide OpenGL 1.x functionality to OpenGL ES accelerated cards (y) or (n)
UseGl4es=
UseGl4es=n
# Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL,
# this will allow small speed optimization. Enable this even when you're using SDL_HWSURFACE. (y) or (n)
@@ -91,7 +91,7 @@ CompatibilityHacksForceScreenUpdate=n
# Application does not call SDL_Flip() or SDL_UpdateRects() after mouse click (ScummVM and all Amiga emulators do that) -
# force screen update by moving mouse cursor a little after each click (y) or (n)
CompatibilityHacksForceScreenUpdateMouseClick=y
CompatibilityHacksForceScreenUpdateMouseClick=n
# Application initializes SDL audio/video inside static constructors (which is bad, you won't be able to run ndk-gdb) (y)/(n)
CompatibilityHacksStaticInit=n
@@ -285,13 +285,12 @@ APP_PLATFORM=
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
# Available architectures: armeabi-v7a arm64-v8a x86 x86_64
MultiABI='armeabi-v7a x86 x86_64 arm64-v8a'
MultiABI=arm64-v8a
MultiABI='arm64-v8a'
# Optional shared libraries to compile - removing some of them will save space
# MP3 patents are expired, but libmad license is GPL, not LGPL
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
CompiledLibraries="c++_shared sdl_image sdl_ttf glm boost_filesystem boost_system boost_date_time boost_locale icuuc icudata iconv charset crypto ssl curl openal vorbis ogg"
CompiledLibraries="c++_shared SDL2_image glm boost_filesystem boost_system boost_date_time boost_locale icuuc icudata iconv charset crypto ssl curl openal vorbis ogg"
# Application uses custom build script AndroidBuild.sh instead of Android.mk (y) or (n)
CustomBuildScript=n

View File

@@ -1 +0,0 @@
include include/Android.mk

View File

@@ -1 +0,0 @@
include include/Android.mk