Skip to content

Commit ce3e11f

Browse files
committed
reorganize autoclass in android.runnable
1 parent e542700 commit ce3e11f

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

recipes/android/src/android/_android.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Android-specific python services.
22

33
cdef extern int SDL_ANDROID_CheckPause()
4-
cdef extern void SDL_ANDROID_WaitForResume()
4+
cdef extern void SDL_ANDROID_WaitForResume() nogil
55
cdef extern void SDL_ANDROID_MapKey(int scancode, int keysym)
66

77
def check_pause():

recipes/android/src/android/runnable.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from jnius import PythonJavaClass, java_method, autoclass
88

99
# reference to the activity
10-
_PythonActivity = None
10+
_PythonActivity = autoclass('org.renpy.android.PythonActivity')
1111

1212

1313
class Runnable(PythonJavaClass):
@@ -23,9 +23,6 @@ def __init__(self, func):
2323
self.func = func
2424

2525
def __call__(self, args, kwargs):
26-
global _PythonActivity
27-
if _PythonActivity is None:
28-
_PythonActivity = autoclass('org.renpy.android.PythonActivity')
2926
self.args = args
3027
self.kwargs = kwargs
3128
_PythonActivity.mActivity.runOnUiThread(self)

0 commit comments

Comments
 (0)