Use nativeSetenv() provided by SDL2 and cleanups#1690
Conversation
|
Ok, I took a look and it seems fine to me (also I have tested it for python2 and python3...and all goes well). Still I prefer that @Jonast or @inclement approve this changes (they made the latest sdl2 related changes in |
|
|
||
|
|
||
| public static native void nativeSetEnv(String j_name, String j_value); | ||
| public static native void nativeSetenv(String name, String value); |
There was a problem hiding this comment.
Is this required given this is already defined in the parent class SDLActivity? I'm not 100% brushed up on my java knowledge but this looks like it might be redundant to me
There was a problem hiding this comment.
oh right nevermind this is in a non-SDL2 bootstrap, I missed that for a second. all fine 👍
ghost
left a comment
There was a problem hiding this comment.
Looks very reasonable to me! I like that you renamed it for the other bootstraps as well so it's still unified. I can't see anything obviously wrong with it, so if this builds & runs fine then it looks good as far as I'm concerned 👍
|
Great, thanks, especially unifying the other bootstraps :) |
Since 16b07ed (bumping SDL2 version from 2.0.4 to 2.0.9),
pythonforandroid/recipes/sdl2/add_nativeSetEnv.patchthat providesnativeSetEnv()is obsolete (in terms of patching location). Furthermore, we don't even need this patch now because SDL2-2.0.9 itself provides the same functionality callednativeSetenv()(NOTnativeSetEnv(), beware the character's case!!) as follows:This PR is to
nativeSetEnv()withnativeSetenv()of SDL2-2.0.9.Note: the occurrences of
nativeSetEnv()inbootstraps/pygame/build/src/org/renpy/android/SDLSurfaceView.javaare intact since this is code is based on SDL1.2 which is now a legacy (and so is pygame...).