mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-27 06:11:51 +00:00
(Android) Refactor g_android
This commit is contained in:
parent
fc55e48221
commit
cd46fc96a6
@ -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
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user