diff options
author | Ian C <ianc@noddybox.co.uk> | 2008-11-03 17:07:32 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2008-11-03 17:07:32 +0000 |
commit | 603f3fac82ccb77775d53fd77ae7c32167116ad7 (patch) | |
tree | 912d684087250ca5cac6e597e06277f1c83f33b0 /source/keyboard.c | |
parent | 1aaaca17a1dc30727578e5fa3755ee6fc05b238d (diff) |
Initial snapshot code (in progress)
Diffstat (limited to 'source/keyboard.c')
-rw-r--r-- | source/keyboard.c | 37 |
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); +} + + |