Skip to content

Commit 0388117

Browse files
committed
Support both sdl3 and sdl2 in android recipe
1 parent aa9cade commit 0388117

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pythonforandroid/recipes/android/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ def prebuild_arch(self, arch):
7373
))
7474
self.config_env[key] = str(value)
7575

76-
if is_sdl:
76+
if bootstrap_name == "sdl2":
77+
fh.write('JNIEnv *SDL_AndroidGetJNIEnv(void);\n')
78+
fh.write(
79+
'#define SDL_ANDROID_GetJNIEnv SDL_AndroidGetJNIEnv\n'
80+
)
81+
elif bootstrap_name == "sdl3":
7782
fh.write('JNIEnv *SDL_GetAndroidJNIEnv(void);\n')
7883
fh.write(
7984
'#define SDL_ANDROID_GetJNIEnv SDL_GetAndroidJNIEnv\n'

0 commit comments

Comments
 (0)