diff --git a/android/native/jni/android_general.h b/android/native/jni/android_general.h index 8424228058..908ef0c549 100644 --- a/android/native/jni/android_general.h +++ b/android/native/jni/android_general.h @@ -20,11 +20,6 @@ #include "android_glue.h" #include "../../../boolean.h" -struct droid -{ - struct android_app* app; -}; - -extern struct droid g_android; +extern struct android_app *g_android; #endif diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 20dc252e8d..86590dbf96 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -87,7 +87,7 @@ static void android_input_poll(void *data) RARCH_PERFORMANCE_INIT(input_poll); RARCH_PERFORMANCE_START(input_poll); - struct android_app* android_app = g_android.app; + struct android_app* android_app = (struct android_app*)g_android; g_extern.lifecycle_state &= ~((1ULL << RARCH_RESET) | (1ULL << RARCH_REWIND) | (1ULL << RARCH_FAST_FORWARD_KEY) | (1ULL << RARCH_FAST_FORWARD_HOLD_KEY) | (1ULL << RARCH_MUTE) | (1ULL << RARCH_SAVE_STATE_KEY) | (1ULL << RARCH_LOAD_STATE_KEY) | (1ULL << RARCH_STATE_SLOT_PLUS) | (1ULL << RARCH_STATE_SLOT_MINUS)); diff --git a/android/native/jni/main.c b/android/native/jni/main.c index 4b925d8238..8a1b56dd73 100644 --- a/android/native/jni/main.c +++ b/android/native/jni/main.c @@ -28,6 +28,8 @@ #include "../../../config.def.h" +struct android_app *g_android; + static void print_cur_config (void *data) { struct android_app *android_app = (struct android_app*)data; @@ -329,7 +331,7 @@ static void* android_app_entry(void *data) pthread_mutex_unlock(&android_app->mutex); memset(&g_android, 0, sizeof(g_android)); - g_android.app = android_app; + g_android = android_app; char *argv[MAX_ARGS] = {NULL}; int argc = android_app_set_argv(android_app, argv); diff --git a/gfx/context/androidegl_ctx.c b/gfx/context/androidegl_ctx.c index a11e8363b0..19ba050baf 100644 --- a/gfx/context/androidegl_ctx.c +++ b/gfx/context/androidegl_ctx.c @@ -80,7 +80,7 @@ static void gfx_ctx_get_video_size(unsigned *width, unsigned *height) static bool gfx_ctx_init(void) { - struct android_app *android_app = (struct android_app*)g_android.app; + struct android_app *android_app = (struct android_app*)g_android; const EGLint attribs[] = { EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, @@ -166,7 +166,7 @@ static void gfx_ctx_check_window(bool *quit, { (void)frame_count; - struct android_app* android_app = g_android.app; + struct android_app *android_app = (struct android_app*)g_android; *quit = false; diff --git a/settings.c b/settings.c index bf368088a7..528507a142 100644 --- a/settings.c +++ b/settings.c @@ -29,9 +29,6 @@ struct settings g_settings; struct global g_extern; -#ifdef ANDROID -struct droid g_android; -#endif const char *config_get_default_audio(void) {