From 5f5ea20c66c7359166e9eb1242e4d88a5616432e Mon Sep 17 00:00:00 2001 From: meepingsnesroms Date: Wed, 13 Mar 2019 12:32:11 -0700 Subject: [PATCH] Clean up MuExpDriver GUI Decided not to let the user set the OS version, that will only cause more issues I will have to deal with down the line. --- tools/palm/muExpansionDriver/MuExpDriver.rcp | 7 +++---- tools/palm/muExpansionDriver/MuExpDriverRsc.h | 4 +++- tools/palm/muExpansionDriver/gui.c | 6 ++++++ tools/palm/muExpansionDriver/traps.c | 8 ++++++++ tools/palm/muExpansionDriver/unimplementedFeatures.txt | 1 + 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/tools/palm/muExpansionDriver/MuExpDriver.rcp b/tools/palm/muExpansionDriver/MuExpDriver.rcp index 038f128..2acb39c 100644 --- a/tools/palm/muExpansionDriver/MuExpDriver.rcp +++ b/tools/palm/muExpansionDriver/MuExpDriver.rcp @@ -14,12 +14,11 @@ MODAL BEGIN TITLE "Emulator Options" CHECKBOX "Enable driver" ID GUI_CHECKBOX_DRIVER_ENABLED AT (42 16 AUTO AUTO) FONT 0 - LABEL "OS Version:" AUTOID AT (33 70) FONT 0 - FIELD ID GUI_FIELD_OS_VERSION AT (PREVRIGHT+3 PREVTOP 37 11) FONT 0 UNDERLINED MAXCHARS 5 NUMERIC CHECKBOX "Patch Inconsistent APIs" ID GUI_CHECKBOX_PATCH_INCONSISTENT_APIS AT (CENTER 33 AUTO AUTO) FONT 0 - LABEL "CPU Speed:" AUTOID AT (33 PREVBOTTOM+4) FONT 0 - FIELD ID GUI_FIELD_CPU_SPEED AT (PREVRIGHT+5 PREVTOP 23 11) FONT 0 UNDERLINED MAXCHARS 3 NUMERIC + LABEL "CPU Speed:" AUTOID AT (33 51) FONT 0 + FIELD ID GUI_FIELD_CPU_SPEED AT (PREVRIGHT+5 PREVTOP 17 11) FONT 0 UNDERLINED MAXCHARS 3 NUMERIC BUTTON "Save and reboot" ID GUI_BUTTON_SAVE_AND_REBOOT AT (CENTER 141 AUTO AUTO) FONT 0 + LABEL "SAFE MODE" ID GUI_LABEL_SAFE_MODE AT (CENTER 123) FONT 1 NONUSABLE END diff --git a/tools/palm/muExpansionDriver/MuExpDriverRsc.h b/tools/palm/muExpansionDriver/MuExpDriverRsc.h index 81f3f90..5fc253b 100644 --- a/tools/palm/muExpansionDriver/MuExpDriverRsc.h +++ b/tools/palm/muExpansionDriver/MuExpDriverRsc.h @@ -3,9 +3,11 @@ #define GUI_FORM_MAIN_WINDOW 1001 #define GUI_FIELD_CPU_SPEED 1002 -#define GUI_FIELD_OS_VERSION 1003 +//#undef GUI_RESERVED 1003 #define GUI_CHECKBOX_DRIVER_ENABLED 1004 #define GUI_CHECKBOX_PATCH_INCONSISTENT_APIS 1005 #define GUI_BUTTON_SAVE_AND_REBOOT 1006 + +#define GUI_LABEL_SAFE_MODE 1007 diff --git a/tools/palm/muExpansionDriver/gui.c b/tools/palm/muExpansionDriver/gui.c index fb79a56..5a647d9 100644 --- a/tools/palm/muExpansionDriver/gui.c +++ b/tools/palm/muExpansionDriver/gui.c @@ -37,6 +37,10 @@ static Boolean appHandleEvent(EventPtr eventP){ CtlSetValue(getObjectPtr(GUI_CHECKBOX_DRIVER_ENABLED), guiConfigFile[DRIVER_ENABLED]); FldSetTextHandle(getObjectPtr(GUI_FIELD_CPU_SPEED), cpuSpeedTextHandle); + if(guiConfigFile[SAFE_MODE]) + FrmShowObject(FrmGetActiveForm(), GUI_LABEL_SAFE_MODE); + else + FrmHideObject(FrmGetActiveForm(), GUI_LABEL_SAFE_MODE); } break; @@ -60,6 +64,8 @@ static Boolean appHandleEvent(EventPtr eventP){ return true; case GUI_BUTTON_SAVE_AND_REBOOT: + /*clear safe mode flag if its set and test the new config*/ + guiConfigFile[SAFE_MODE] = false; writeConfigFile(guiConfigFile); debugLog("Attempting reboot!\n"); SysReset(); diff --git a/tools/palm/muExpansionDriver/traps.c b/tools/palm/muExpansionDriver/traps.c index 97d54d2..07b66ad 100644 --- a/tools/palm/muExpansionDriver/traps.c +++ b/tools/palm/muExpansionDriver/traps.c @@ -278,6 +278,14 @@ void emuScrDrawChars(WinPtr pWindow, Int16 xLoc, Int16 yLoc, Int16 xExtent, Int1 /*do nothing*/ } +/* +may need to set this to change the border color like on OS 5 +Boolean UIPickColor(IndexedColorType *indexP, RGBColorType *rgbP, + UIPickColorStartType start, const Char *titleP, + const Char *tipP) +SYS_TRAP(sysTrapUIPickColor); +*/ + /* may need to remove these from trap table: ScrGetGrayPat diff --git a/tools/palm/muExpansionDriver/unimplementedFeatures.txt b/tools/palm/muExpansionDriver/unimplementedFeatures.txt index d282001..8131f90 100644 --- a/tools/palm/muExpansionDriver/unimplementedFeatures.txt +++ b/tools/palm/muExpansionDriver/unimplementedFeatures.txt @@ -9,5 +9,6 @@ GUI Setting window color like OS 5 Tungsten W drivers are corrupting the trap table pointer(and a ton of other low mem globals) For some reason the new versions of MuExpDriver dont work with Chuzzle anymore +Need to allocate a new trap table and set the global to that, not just write off the end of the existing one Fixed: \ No newline at end of file