mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-02 23:14:34 +00:00
(Android) Move g_android outside of general.h
This commit is contained in:
parent
2af0a43ad0
commit
82d2ee63dc
36
android/native/jni/android-general.h
Normal file
36
android/native/jni/android-general.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef _ANDROID_GENERAL_H
|
||||
#define _ANDROID_GENERAL_H
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES/gl.h>
|
||||
|
||||
#include <android/sensor.h>
|
||||
#include <android_native_app_glue.h>
|
||||
|
||||
struct saved_state
|
||||
{
|
||||
float angle;
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
};
|
||||
|
||||
struct droid
|
||||
{
|
||||
struct android_app* app;
|
||||
|
||||
ASensorManager* sensorManager;
|
||||
const ASensor* accelerometerSensor;
|
||||
ASensorEventQueue* sensorEventQueue;
|
||||
|
||||
int animating;
|
||||
EGLDisplay display;
|
||||
EGLSurface surface;
|
||||
EGLContext context;
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
struct saved_state state;
|
||||
};
|
||||
|
||||
extern struct droid g_android;
|
||||
|
||||
#endif
|
@ -18,12 +18,7 @@
|
||||
#include <jni.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES/gl.h>
|
||||
|
||||
#include <android/sensor.h>
|
||||
#include <android_native_app_glue.h>
|
||||
|
||||
#include "android-general.h"
|
||||
#include "../../../general.h"
|
||||
|
||||
JNIEXPORT jint JNICALL JNI_OnLoad( JavaVM *vm, void *pvt)
|
||||
|
42
general.h
42
general.h
@ -41,6 +41,10 @@
|
||||
#include <time/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
#include "android/native/jni/android-general.h"
|
||||
#endif
|
||||
|
||||
#if defined(XENON) || defined(__CELLOS_LV2__)
|
||||
#undef PATH_MAX
|
||||
#define PATH_MAX 4096
|
||||
@ -567,41 +571,6 @@ struct global
|
||||
jmp_buf error_sjlj_context;
|
||||
};
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES/gl.h>
|
||||
|
||||
#include <android/sensor.h>
|
||||
#include <android_native_app_glue.h>
|
||||
|
||||
/**
|
||||
* Our saved state data.
|
||||
*/
|
||||
struct saved_state
|
||||
{
|
||||
float angle;
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
};
|
||||
|
||||
struct droid
|
||||
{
|
||||
struct android_app* app;
|
||||
|
||||
ASensorManager* sensorManager;
|
||||
const ASensor* accelerometerSensor;
|
||||
ASensorEventQueue* sensorEventQueue;
|
||||
|
||||
int animating;
|
||||
EGLDisplay display;
|
||||
EGLSurface surface;
|
||||
EGLContext context;
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
struct saved_state state;
|
||||
};
|
||||
#endif
|
||||
|
||||
// Public functions
|
||||
void config_load(void);
|
||||
void config_set_defaults(void);
|
||||
@ -634,9 +603,6 @@ void rarch_state_slot_decrease(void);
|
||||
// Public data structures
|
||||
extern struct settings g_settings;
|
||||
extern struct global g_extern;
|
||||
#ifdef ANDROID
|
||||
extern struct droid g_android;
|
||||
#endif
|
||||
/////////
|
||||
|
||||
#include "retroarch_logger.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user