@@ -477,29 +477,6 @@ void android_app_set_motion_event_filter(struct android_app* app,
477
477
pthread_mutex_unlock (& app -> mutex );
478
478
}
479
479
480
- bool android_app_input_available_wake_up (struct android_app * app ) {
481
- pthread_mutex_lock (& app -> mutex );
482
- bool available = app -> inputAvailableWakeUp ;
483
- app -> inputAvailableWakeUp = false;
484
- pthread_mutex_unlock (& app -> mutex );
485
- return available ;
486
- }
487
-
488
- // NB: should be called with the android_app->mutex held already
489
- static void notifyInput (struct android_app * android_app ) {
490
- // Don't spam the mainloop with wake ups if we've already sent one
491
- if (android_app -> inputSwapPending ) {
492
- return ;
493
- }
494
-
495
- if (android_app -> looper != NULL ) {
496
- // for the app thread to know why it received the wake() up
497
- android_app -> inputAvailableWakeUp = true;
498
- android_app -> inputSwapPending = true;
499
- ALooper_wake (android_app -> looper );
500
- }
501
- }
502
-
503
480
static bool onTouchEvent (GameActivity * activity ,
504
481
const GameActivityMotionEvent * event ) {
505
482
struct android_app * android_app = ToApp (activity );
@@ -529,7 +506,6 @@ static bool onTouchEvent(GameActivity* activity,
529
506
int new_ix = inputBuffer -> motionEventsCount ;
530
507
memcpy (& inputBuffer -> motionEvents [new_ix ], event , sizeof (GameActivityMotionEvent ));
531
508
++ inputBuffer -> motionEventsCount ;
532
- notifyInput (android_app );
533
509
534
510
pthread_mutex_unlock (& android_app -> mutex );
535
511
return true;
@@ -551,9 +527,6 @@ struct android_input_buffer* android_app_swap_input_buffers(
551
527
NATIVE_APP_GLUE_MAX_INPUT_BUFFERS ;
552
528
}
553
529
554
- android_app -> inputSwapPending = false;
555
- android_app -> inputAvailableWakeUp = false;
556
-
557
530
pthread_mutex_unlock (& android_app -> mutex );
558
531
559
532
return inputBuffer ;
@@ -606,7 +579,6 @@ static bool onKey(GameActivity* activity, const GameActivityKeyEvent* event) {
606
579
int new_ix = inputBuffer -> keyEventsCount ;
607
580
memcpy (& inputBuffer -> keyEvents [new_ix ], event , sizeof (GameActivityKeyEvent ));
608
581
++ inputBuffer -> keyEventsCount ;
609
- notifyInput (android_app );
610
582
611
583
pthread_mutex_unlock (& android_app -> mutex );
612
584
return true;
0 commit comments