diff --git a/Windows/InputDevice.cpp b/Windows/InputDevice.cpp index 0a16a80e7..b82656c36 100644 --- a/Windows/InputDevice.cpp +++ b/Windows/InputDevice.cpp @@ -44,10 +44,6 @@ inline static void ExecuteInputPoll() { // If that becomes an issue, maybe should poll to a copy of inputstate and only hold the lock while // copying that one to the real one? std::lock_guard guard(input_state.lock); - input_state.pad_lstick_x = 0; - input_state.pad_lstick_y = 0; - input_state.pad_rstick_x = 0; - input_state.pad_rstick_y = 0; if (host && (focused || !g_Config.bGamepadOnlyFocused)) { host->PollControllers(input_state); } diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp index 7a4604460..1037bf008 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp @@ -672,15 +672,6 @@ extern "C" void Java_org_ppsspp_ppsspp_NativeRenderer_displayRender(JNIEnv *env, } if (renderer_inited) { - // TODO: Look into if these locks are a perf loss - { - std::lock_guard guard(input_state.lock); - - input_state.pad_lstick_x = left_joystick_x_async; - input_state.pad_lstick_y = left_joystick_y_async; - input_state.pad_rstick_x = right_joystick_x_async; - input_state.pad_rstick_y = right_joystick_y_async; - } NativeUpdate(input_state); NativeRender(graphicsContext); @@ -1050,15 +1041,6 @@ extern "C" bool JNICALL Java_org_ppsspp_ppsspp_NativeActivity_runEGLRenderLoop(J setCurrentThreadName("AndroidRender"); } - // TODO: Look into if these locks are a perf loss - { - std::lock_guard guard(input_state.lock); - - input_state.pad_lstick_x = left_joystick_x_async; - input_state.pad_lstick_y = left_joystick_y_async; - input_state.pad_rstick_x = right_joystick_x_async; - input_state.pad_rstick_y = right_joystick_y_async; - } NativeUpdate(input_state); NativeRender(graphicsContext); diff --git a/ext/native/base/PCMain.cpp b/ext/native/base/PCMain.cpp index 8648695fb..1ba599b34 100644 --- a/ext/native/base/PCMain.cpp +++ b/ext/native/base/PCMain.cpp @@ -346,14 +346,6 @@ int System_GetPropertyInt(SystemProperty prop) { InputState input_state; -void SimulateGamepad(const uint8_t *keys, InputState *input) { - // Legacy key mapping. - input->pad_lstick_x = 0; - input->pad_lstick_y = 0; - input->pad_rstick_x = 0; - input->pad_rstick_y = 0; -} - extern void mixaudio(void *userdata, Uint8 *stream, int len) { NativeMix((short *)stream, len / 4); } @@ -843,7 +835,6 @@ int main(int argc, char *argv[]) { if (g_QuitRequested) break; const uint8_t *keys = SDL_GetKeyboardState(NULL); - SimulateGamepad(keys, &input_state); UpdateRunLoop(&input_state); if (g_QuitRequested) break; diff --git a/ext/native/input/input_state.h b/ext/native/input/input_state.h index 77131c751..2b1b771aa 100644 --- a/ext/native/input/input_state.h +++ b/ext/native/input/input_state.h @@ -132,14 +132,6 @@ struct InputState { memset(pointer_down, 0, sizeof(pointer_down)); } - // Gamepad style input. For ease of use. - float pad_lstick_x; - float pad_lstick_y; - float pad_rstick_x; - float pad_rstick_y; - float pad_ltrigger; - float pad_rtrigger; - // Mouse/touch style input // There are up to 8 mice / fingers. volatile bool mouse_valid;