(Android) have engine_handle_cmd take as argument void*

This commit is contained in:
twinaphex 2013-11-22 17:41:45 +01:00
parent 92ba397519
commit d66d4f7263
3 changed files with 6 additions and 5 deletions

View File

@ -92,10 +92,10 @@ static typeof(AMotionEvent_getAxisValue) *p_AMotionEvent_getAxisValue;
#define AMotionEvent_getAxisValue (*p_AMotionEvent_getAxisValue)
void engine_handle_cmd(void)
void engine_handle_cmd(void *data)
{
struct android_app *android_app = (struct android_app*)g_android;
android_input_t *android = (android_input_t*)driver.input_data;
android_input_t *android = (android_input_t*)data;
int8_t cmd;
if (read(android_app->msgread, &cmd, sizeof(cmd)) != sizeof(cmd))
@ -1970,7 +1970,7 @@ static void android_input_poll(void *data)
}
}
else if (ident == LOOPER_ID_MAIN)
engine_handle_cmd();
engine_handle_cmd(driver.input_data);
}
}

View File

@ -252,7 +252,7 @@ static bool android_run_events (void *data)
int id = ALooper_pollOnce(-1, NULL, NULL, NULL);
if (id == LOOPER_ID_MAIN)
engine_handle_cmd();
engine_handle_cmd(driver.input_data);
// Check if we are exiting.
if (g_extern.lifecycle_state & (1ULL << RARCH_QUIT_KEY))

View File

@ -49,6 +49,7 @@ enum {
LOOPER_ID_MAIN = 1,
LOOPER_ID_INPUT = 2,
LOOPER_ID_USER = 3,
LOOPER_ID_INPUT_MSG = 4,
};
enum {
@ -147,7 +148,7 @@ enum {
APP_CMD_DEAD,
};
extern void engine_handle_cmd(void);
extern void engine_handle_cmd(void*);
extern JNIEnv *jni_thread_getenv(void);
extern struct android_app *g_android;