main.c - Now includes menu options to change save types on the fly
resources .h/.rc - Added Config menu and Save Types options
This commit is contained in:
parent
1380659c61
commit
2d03f5a247
|
@ -822,6 +822,35 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
EnableMenuItem(menu, IDM_PAUSE, MF_GRAYED);
|
||||
execute = FALSE;
|
||||
return 0;
|
||||
|
||||
#define saver(one,two,three,four,five) \
|
||||
CheckMenuItem(menu, IDC_SAVETYPE1, MF_BYCOMMAND | one); \
|
||||
CheckMenuItem(menu, IDC_SAVETYPE2, MF_BYCOMMAND | two); \
|
||||
CheckMenuItem(menu, IDC_SAVETYPE3, MF_BYCOMMAND | three); \
|
||||
CheckMenuItem(menu, IDC_SAVETYPE4, MF_BYCOMMAND | four); \
|
||||
CheckMenuItem(menu, IDC_SAVETYPE5, MF_BYCOMMAND | five);
|
||||
|
||||
case IDC_SAVETYPE1:
|
||||
saver(MF_CHECKED,MF_UNCHECKED,MF_UNCHECKED,MF_UNCHECKED,MF_UNCHECKED);
|
||||
mc_realloc(MC_TYPE_EEPROM1,MC_SIZE_4KBITS);
|
||||
return 0;
|
||||
case IDC_SAVETYPE2:
|
||||
saver(MF_UNCHECKED,MF_CHECKED,MF_UNCHECKED,MF_UNCHECKED,MF_UNCHECKED);
|
||||
mc_realloc(MC_TYPE_EEPROM2,MC_SIZE_64KBITS);
|
||||
return 0;
|
||||
case IDC_SAVETYPE3:
|
||||
saver(MF_UNCHECKED,MF_UNCHECKED,MF_CHECKED,MF_UNCHECKED,MF_UNCHECKED);
|
||||
mc_realloc(MC_TYPE_EEPROM2,MC_SIZE_512KBITS);
|
||||
return 0;
|
||||
case IDC_SAVETYPE4:
|
||||
saver(MF_UNCHECKED,MF_UNCHECKED,MF_UNCHECKED,MF_CHECKED,MF_UNCHECKED);
|
||||
mc_realloc(MC_TYPE_FRAM,MC_SIZE_256KBITS);
|
||||
return 0;
|
||||
case IDC_SAVETYPE5:
|
||||
saver(MF_UNCHECKED,MF_UNCHECKED,MF_UNCHECKED,MF_UNCHECKED,MF_CHECKED);
|
||||
mc_realloc(MC_TYPE_FLASH,MC_SIZE_2MBITS);
|
||||
return 0;
|
||||
|
||||
case IDM_RESET:
|
||||
NDS_Reset();
|
||||
return 0;
|
||||
|
|
|
@ -87,6 +87,12 @@ void refreshAll();
|
|||
#define IDM_CONFIG 180
|
||||
#define IDD_CONFIG 181
|
||||
|
||||
#define IDC_SAVETYPE1 182
|
||||
#define IDC_SAVETYPE2 183
|
||||
#define IDC_SAVETYPE3 184
|
||||
#define IDC_SAVETYPE4 185
|
||||
#define IDC_SAVETYPE5 186
|
||||
|
||||
#define IDD_MEM_VIEWER 301
|
||||
#define IDC_8_BIT 302
|
||||
#define IDC_16_BIT 303
|
||||
|
|
|
@ -308,6 +308,17 @@ MENU_PRINCIPAL MENU
|
|||
MENUITEM "&Pause", IDM_PAUSE
|
||||
MENUITEM "&Reset", IDM_RESET
|
||||
}
|
||||
POPUP "&Config"
|
||||
{
|
||||
POPUP "&Save Type"
|
||||
{
|
||||
MENUITEM "&EEPROM 4kbit", IDC_SAVETYPE1
|
||||
MENUITEM "&EEPROM 64kbit", IDC_SAVETYPE2
|
||||
MENUITEM "&EEPROM 512kbit", IDC_SAVETYPE3
|
||||
MENUITEM "&FRAM 256kbit", IDC_SAVETYPE4
|
||||
MENUITEM "&FLASH 2mbit", IDC_SAVETYPE5
|
||||
}
|
||||
}
|
||||
POPUP "&Tools"
|
||||
{
|
||||
MENUITEM "Config", IDM_CONFIG
|
||||
|
|
Loading…
Reference in New Issue