summaryrefslogtreecommitdiff
path: root/source/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/main.c')
-rw-r--r--source/main.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/source/main.c b/source/main.c
index aed05f5..f2b0e70 100644
--- a/source/main.c
+++ b/source/main.c
@@ -32,6 +32,7 @@
#include "z80.h"
#include "zx81.h"
#include "tapes.h"
+#include "config.h"
#include "splashimg_bin.h"
#include "rom_font_bin.h"
@@ -42,8 +43,7 @@ static const char *main_menu[]=
{
"Reset ZX81",
"Select Tape",
- "Sticky Shift On",
- "Sticky Shift Off",
+ "Configure",
"Map Joypad to Keys",
"Cancel",
NULL
@@ -53,8 +53,7 @@ typedef enum
{
MenuReset,
MenuSelectTape,
- MenuStickyOn,
- MenuStickyOff,
+ MenuConfigure,
MenuMapJoypad,
} MenuOpt;
@@ -301,9 +300,11 @@ int main(int argc, char *argv[])
Splash();
+ LoadConfig();
+
SK_DisplayKeyboard(BG_GFX_SUB);
- SK_SetSticky(SK_SHIFT,1);
+ SK_SetSticky(SK_SHIFT,DS81_Config[DS81_STICKY_SHIFT]);
while(1)
{
@@ -329,12 +330,10 @@ int main(int argc, char *argv[])
SelectTape();
break;
- case MenuStickyOn:
- SK_SetSticky(SK_SHIFT,1);
- break;
-
- case MenuStickyOff:
- SK_SetSticky(SK_SHIFT,0);
+ case MenuConfigure:
+ GUI_Config();
+ SK_SetSticky(SK_SHIFT,
+ DS81_Config[DS81_STICKY_SHIFT]);
break;
case MenuMapJoypad: