summaryrefslogtreecommitdiff
path: root/source/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/keyboard.c')
-rw-r--r--source/keyboard.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/source/keyboard.c b/source/keyboard.c
index d2e7aa7..6483b1c 100644
--- a/source/keyboard.c
+++ b/source/keyboard.c
@@ -26,6 +26,7 @@
#include "framebuffer.h"
#include "touchwrap.h"
#include "keyb_bin.h"
+#include "stream.h"
/* ---------------------------------------- STATIC DATA
*/
@@ -409,3 +410,39 @@ const char *SK_KeyName(SoftKey k)
}
+void SK_SaveSnapshot(FILE *fp)
+{
+ STRPUT(fp, pad_left_key);
+ STRPUT(fp, pad_right_key);
+ STRPUT(fp, pad_up_key);
+ STRPUT(fp, pad_down_key);
+ STRPUT(fp, pad_A_key);
+ STRPUT(fp, pad_B_key);
+ STRPUT(fp, pad_X_key);
+ STRPUT(fp, pad_Y_key);
+ STRPUT(fp, pad_R_key);
+ STRPUT(fp, pad_L_key);
+ STRPUT(fp, pad_start_key);
+ STRPUT(fp, pad_select_key);
+ STRPUT(fp, key_state);
+}
+
+
+void SK_LoadSnapshot(FILE *fp)
+{
+ STRGET(fp, pad_left_key);
+ STRGET(fp, pad_right_key);
+ STRGET(fp, pad_up_key);
+ STRGET(fp, pad_down_key);
+ STRGET(fp, pad_A_key);
+ STRGET(fp, pad_B_key);
+ STRGET(fp, pad_X_key);
+ STRGET(fp, pad_Y_key);
+ STRGET(fp, pad_R_key);
+ STRGET(fp, pad_L_key);
+ STRGET(fp, pad_start_key);
+ STRGET(fp, pad_select_key);
+ STRGET(fp, key_state);
+}
+
+