(Android) Start copying state copy at poll function call

This commit is contained in:
twinaphex 2015-04-29 04:57:24 +02:00
parent cf1d56dbda
commit 5c5e517b68

View File

@ -91,7 +91,7 @@ typedef struct android_input_state
typedef struct android_input
{
android_input_state_t copy;
android_input_state_t copy, thread;
sensor_t accelerometer_state;
ASensorManager *sensorManager;
ASensorEventQueue *sensorEventQueue;
@ -841,7 +841,7 @@ static void android_input_poll(void *data)
switch (ident)
{
case LOOPER_ID_INPUT:
android_input_handle_input(&android->copy);
android_input_handle_input(&android->thread);
break;
case LOOPER_ID_USER:
android_input_handle_user(data);
@ -851,6 +851,8 @@ static void android_input_poll(void *data)
break;
}
}
memcpy(&android->copy, &android->thread, sizeof(android->copy));
}
bool android_run_events(void *data)