Commit 6f20ee75 authored by kenan's avatar kenan

移除 process_input

parent 6817dfe3
......@@ -40,12 +40,11 @@ int GetListBoxIndex(IGUIListBox* listbox, const wchar_t * target){
return -1;
}
void android_main(ANDROID_APP app) {
app->inputPollSource.process = android::process_input;
#else
int main(int argc, char* argv[]) {
#endif
evthread_use_pthreads();
ygo::Game* game = new ygo::Game;
auto game = new ygo::Game;
if(ygo::mainGame != nullptr){
delete ygo::mainGame;
}
......
......@@ -859,29 +859,6 @@ void toggleOverlayView(ANDROID_APP app, bool pShow) {
jni->DeleteLocalRef(ClassNativeActivity);
app->activity->vm->DetachCurrentThread();
}
void process_input(ANDROID_APP app,
struct android_poll_source* source) {
AInputEvent* event = NULL;
if (AInputQueue_getEvent(app->inputQueue, &event) >= 0) {
int type = AInputEvent_getType(event);
bool skip_predispatch = AInputEvent_getType(event)
== AINPUT_EVENT_TYPE_KEY
&& AKeyEvent_getKeyCode(event) == AKEYCODE_BACK;
// skip predispatch (all it does is send to the IME)
if (!skip_predispatch
&& AInputQueue_preDispatchEvent(app->inputQueue, event)) {
return;
}
int32_t handled = 0;
if (app->onInputEvent != NULL)
handled = app->onInputEvent(app, event);
AInputQueue_finishEvent(app->inputQueue, event, handled);
} else {
// LOGE("Failure reading next input event: %s\n", strerror(errno));
}
}
void onGameExit(ANDROID_APP app){
if (!app || !app->activity || !app->activity->vm)
......
......@@ -186,10 +186,6 @@ extern bool getFontAntiAlias(ANDROID_APP app);
extern void showAndroidComboBoxCompat(ANDROID_APP app, bool pShow,
char** pContents, int count, int mode = 0);
/* android event handlers*/
extern void process_input(ANDROID_APP app,
struct android_poll_source* source);
extern s32 handleInput(ANDROID_APP app, AInputEvent* androidEvent);
extern bool android_deck_delete(const char* deck_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment