From 077acf7894e1b51db9cb0a9ca05bec8e8001a4b7 Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Sat, 3 Dec 2011 02:40:20 +0100 Subject: [PATCH] (PS3) Savestates hooked up (R2 + R3 - save state - L2 + R3 - load state - R2 + Right stick right - save state plus - R2 + Right stick left - save state minus) --- ps3/ps3_input.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/ps3/ps3_input.c b/ps3/ps3_input.c index d73e90e67e..05663f84cf 100644 --- a/ps3/ps3_input.c +++ b/ps3/ps3_input.c @@ -112,12 +112,25 @@ static void* ps3_input_init(void) static bool ps3_key_pressed(void *data, int key) { (void)data; - if (key == SSNES_FAST_FORWARD_HOLD_KEY) - return CTRL_RSTICK_UP(state[0]); - else if (key == SSNES_REWIND) - return CTRL_RSTICK_DOWN(state[0]); - else - return false; + switch(key) + { + case SSNES_FAST_FORWARD_HOLD_KEY: + return CTRL_RSTICK_UP(state[0]); + case SSNES_LOAD_STATE_KEY: + return (CTRL_L2(state[0]) && CTRL_R3(state[0])); + case SSNES_SAVE_STATE_KEY: + return (CTRL_R2(state[0]) && CTRL_R3(state[0])); + case SSNES_STATE_SLOT_PLUS: + return (CTRL_RSTICK_RIGHT(state[0]) && CTRL_R2(state[0])); + case SSNES_STATE_SLOT_MINUS: + return (CTRL_RSTICK_LEFT(state[0]) && CTRL_R2(state[0])); + case SSNES_REWIND: + return CTRL_RSTICK_DOWN(state[0]); + default: + break; + } + + return false; } const input_driver_t input_ps3 = {