From 425af71450b06dd40055806ed2d3377c8be62ede Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 4 Dec 2011 01:40:25 +0100 Subject: [PATCH] GET_CAN_REWIND. --- dynamic.c | 5 +++++ libsnes.hpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/dynamic.c b/dynamic.c index 8c1625c177..7114002888 100644 --- a/dynamic.c +++ b/dynamic.c @@ -328,6 +328,11 @@ static bool environment_cb(unsigned cmd, void *data) SSNES_LOG("Environ SET_NEED_FULLPATH: %s\n", g_extern.system.need_fullpath ? "true" : "false"); break; + case SNES_ENVIRONMENT_GET_CAN_REWIND: + *(bool*)data = g_settings.rewind_enable; + SSNES_LOG("Environ GET_CAN_REWIND: %s\n", g_settings.rewind_enable ? "true" : "false"); + break; + default: SSNES_LOG("Environ UNSUPPORTED (#%u)!\n", cmd); return false; diff --git a/libsnes.hpp b/libsnes.hpp index 68a34a62fa..baa5f1190c 100755 --- a/libsnes.hpp +++ b/libsnes.hpp @@ -94,6 +94,11 @@ extern "C" { // Implementation must then use SNES_ENVIRONMENT_GET_FULLPATH. // This is useful for implementations with very large roms, // which are impractical to load fully into RAM. + // +#define SNES_ENVIRONMENT_GET_CAN_REWIND 7 // bool * -- + // Boolean value telling if SSNES is able to rewind. + // Some implementations might need to take extra precautions + // to allow this as smoothly as possible. struct snes_geometry {