mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-23 16:19:44 +00:00
Remove pad_lstick/rstick/ltrigger/rtrigger.
This commit is contained in:
parent
22396ebe8f
commit
94700f287d
@ -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<std::mutex> 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);
|
||||
}
|
||||
|
@ -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<std::mutex> 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<std::mutex> 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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user