Skip to content

Commit d70e79c

Browse files
committed
Remove SDL libs, add SDL2.
1 parent 861ae4c commit d70e79c

File tree

2,060 files changed

+347821
-534297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,060 files changed

+347821
-534297
lines changed

src/jni/Android.mk

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1 @@
1-
2-
# The namespace in Java file, with dots replaced with underscores
3-
SDL_JAVA_PACKAGE_PATH := org_renpy_android
4-
5-
# Path to shared libraries - Android 1.6 cannot load them properly, thus we have to specify absolute path here
6-
# SDL_SHARED_LIBRARIES_PATH := /data/data/de.schwardtnet.alienblaster/lib
7-
8-
# Path to files with application data - they should be downloaded from Internet on first app run inside
9-
# Java sources, or unpacked from resources (TODO)
10-
# Typically /sdcard/alienblaster
11-
# Or /data/data/de.schwardtnet.alienblaster/files if you're planning to unpack data in application private folder
12-
# Your application will just set current directory there
13-
SDL_CURDIR_PATH := org.renpy.android
14-
15-
# Android Dev Phone G1 has trackball instead of cursor keys, and
16-
# sends trackball movement events as rapid KeyDown/KeyUp events,
17-
# this will make Up/Down/Left/Right key up events with X frames delay,
18-
# so if application expects you to press and hold button it will process the event correctly.
19-
# TODO: create a libsdl config file for that option and for key mapping/on-screen keyboard
20-
SDL_TRACKBALL_KEYUP_DELAY := 1
21-
22-
# If the application designed for higher screen resolution enable this to get the screen
23-
# resized in HW-accelerated way, however it eats a tiny bit of CPU
24-
SDL_VIDEO_RENDER_RESIZE := 0
25-
26-
COMPILED_LIBRARIES := sdl_ttf sdl_image
27-
28-
APPLICATION_ADDITIONAL_CFLAGS := -finline-functions -O2 -DSDL_JAVA_PACKAGE_PATH=$(SDL_JAVA_PACKAGE_PATH)
29-
30-
APPLICATION_ADDITIONAL_LDFLAGS := -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions
31-
32-
SDL_ADDITIONAL_CFLAGS := -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCODE_0=SPACE -DSDL_ANDROID_KEYCODE_1=RETURN -DSDL_ANDROID_KEYCODE_2=LCTRL -DSDL_ANDROID_KEYCODE_3=LALT -DSDL_ANDROID_KEYCODE_4=RETURN
33-
34-
# If SDL_Mixer should link to libMAD
35-
SDL_MIXER_USE_LIBMAD :=
36-
ifneq ($(strip $(filter mad, $(COMPILED_LIBRARIES))),)
37-
SDL_MIXER_USE_LIBMAD := 1
38-
endif
39-
401
include $(call all-subdir-makefiles)

src/jni/Application.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ APP_PROJECT_PATH := $(call my-dir)/..
55
# sdl_image depends on png and jpeg
66
# sdl_ttf depends on freetype
77

8-
APP_MODULES := application sdl sdl_main tremor png jpeg freetype sdl_ttf sdl_image sqlite3
8+
APP_MODULES := SDL2 application png jpeg freetype
99

1010
APP_ABI := $(ARCH)
1111
APP_STL := gnustl_static
1212
APP_CFLAGS += $(OFLAG)
13+
14+
APP_PLATFORM := android-9

src/jni/application/Android.mk

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ LOCAL_MODULE := application
77
APP_SUBDIRS := $(patsubst $(LOCAL_PATH)/%, %, $(shell find $(LOCAL_PATH)/src/ -type d))
88

99
LOCAL_CFLAGS := $(foreach D, $(APP_SUBDIRS), -I$(LOCAL_PATH)/$(D)) \
10-
-I$(LOCAL_PATH)/../sdl/include \
11-
-I$(LOCAL_PATH)/../sdl_mixer \
12-
-I$(LOCAL_PATH)/../sdl_image \
13-
-I$(LOCAL_PATH)/../sdl_ttf \
14-
-I$(LOCAL_PATH)/../sdl_net \
15-
-I$(LOCAL_PATH)/../sdl_blitpool \
16-
-I$(LOCAL_PATH)/../sdl_gfx \
17-
-I$(LOCAL_PATH)/../png \
18-
-I$(LOCAL_PATH)/../jpeg \
19-
-I$(LOCAL_PATH)/../intl \
2010
-I$(LOCAL_PATH)/.. \
2111
-I$(LOCAL_PATH)/../../../build/python-install/include/python2.7
2212

@@ -30,9 +20,9 @@ LOCAL_SRC_FILES := $(foreach F, $(APP_SUBDIRS), $(addprefix $(F)/,$(notdir $(wil
3020
# Uncomment to also add C sources
3121
LOCAL_SRC_FILES += $(foreach F, $(APP_SUBDIRS), $(addprefix $(F)/,$(notdir $(wildcard $(LOCAL_PATH)/$(F)/*.c))))
3222

33-
LOCAL_SHARED_LIBRARIES := sdl $(COMPILED_LIBRARIES)
23+
LOCAL_SHARED_LIBRARIES := SDL2 jpeg png $(COMPILED_LIBRARIES)
3424

35-
LOCAL_STATIC_LIBRARIES := jpeg png
25+
LOCAL_STATIC_LIBRARIES :=
3626

3727
LOCAL_LDLIBS := -lpython2.7 -ldl -llog -lz
3828

src/jni/application/python/jniwrapperstuff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#define _JNI_WRAPPER_STUFF_H_
55

66
#ifndef SDL_JAVA_PACKAGE_PATH
7-
#error You have to define SDL_JAVA_PACKAGE_PATH to your package path with dots replaced with underscores, for example "com_example_SanAngeles"
7+
#define SDL_JAVA_PACKAGE_PATH org_renpy_android
88
#endif
99
#define JAVA_EXPORT_NAME2(name,package) Java_##package##_##name
1010
#define JAVA_EXPORT_NAME1(name,package) JAVA_EXPORT_NAME2(name,package)

src/jni/application/python/start.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <stdlib.h>
99
#include <unistd.h>
1010
#include <jni.h>
11-
#include "SDL.h"
1211
#include "android/log.h"
1312
#include "jniwrapperstuff.h"
1413

src/jni/intl/Android.mk

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)