mirror of
https://github.com/libretro/RetroArch
synced 2025-03-12 22:14:30 +00:00
(Android) performance counter for engine_handle_input
This commit is contained in:
parent
12f5434f3e
commit
035713f124
@ -16,6 +16,7 @@
|
||||
|
||||
#include <android/keycodes.h>
|
||||
#include "android-general.h"
|
||||
#include "../../../benchmark.h"
|
||||
#include "../../../general.h"
|
||||
#include "../../../driver.h"
|
||||
#include "input_android.h"
|
||||
@ -62,6 +63,9 @@ static int32_t keycode_lut[LAST_KEYCODE];
|
||||
|
||||
static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
||||
{
|
||||
RARCH_PERFORMANCE_INIT(handle_input);
|
||||
RARCH_PERFORMANCE_START(handle_input);
|
||||
|
||||
int id = AInputEvent_getDeviceId(event);
|
||||
int i = state_device_ids[id];
|
||||
|
||||
@ -124,6 +128,8 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
||||
if(keycode == AKEYCODE_BACK || keycode == AKEYCODE_VOLUME_UP || keycode == AKEYCODE_VOLUME_DOWN)
|
||||
return 0;
|
||||
|
||||
RARCH_PERFORMANCE_STOP(handle_input);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user