From a63ccbbdab7c80f76e8a466ab150420c61a8cb46 Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Sat, 3 Dec 2011 00:07:01 +0100 Subject: [PATCH] (PS3) Implemented rewind/fast forward hooks --- ps3/pkg/USRDIR/ssnes.cfg | 2 +- ps3/ps3_input.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ps3/pkg/USRDIR/ssnes.cfg b/ps3/pkg/USRDIR/ssnes.cfg index 141ae2c8c0..953ed6c23b 100644 --- a/ps3/pkg/USRDIR/ssnes.cfg +++ b/ps3/pkg/USRDIR/ssnes.cfg @@ -257,7 +257,7 @@ # Enable rewinding. This will take a performance hit when playing, so it is disabled by default. # Do note that rewinding will only work properly when using bSNES libsnes core atm. -# rewind_enable = false +# rewind_enable = true # Rewinding buffer size in megabytes. Bigger rewinding buffer means you can rewind longer. # The buffer should be approx. 20MB per minute of buffer time. diff --git a/ps3/ps3_input.c b/ps3/ps3_input.c index 7a275eb2b7..d73e90e67e 100644 --- a/ps3/ps3_input.c +++ b/ps3/ps3_input.c @@ -112,8 +112,12 @@ static void* ps3_input_init(void) static bool ps3_key_pressed(void *data, int key) { (void)data; - (void)key; - return false; // Dummy for now. + 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; } const input_driver_t input_ps3 = {