From 96a116e096d1ecc63c5086eb09f1cb40f22e1dea Mon Sep 17 00:00:00 2001 From: owomomo Date: Sun, 19 Jul 2020 06:43:23 +0800 Subject: [PATCH] Shortcuts of bookmarks in Hex Editor can be customized. (#129) --- src/drivers/win/debuggersp.cpp | 53 ++++----- src/drivers/win/debuggersp.h | 3 +- src/drivers/win/memview.cpp | 18 ++- src/drivers/win/memviewsp.cpp | 200 +++++++++++++++++++++++++++++---- src/drivers/win/memviewsp.h | 9 ++ src/drivers/win/pref.cpp | 53 +++++++-- src/drivers/win/res.rc | 28 +++-- src/drivers/win/resource.h | 18 ++- 8 files changed, 299 insertions(+), 83 deletions(-) diff --git a/src/drivers/win/debuggersp.cpp b/src/drivers/win/debuggersp.cpp index 940f3605..29587997 100644 --- a/src/drivers/win/debuggersp.cpp +++ b/src/drivers/win/debuggersp.cpp @@ -751,8 +751,7 @@ void loadNameFiles() } // bookmarks -std::vector bookmarks_addr; -std::vector bookmarks_name; +std::vector > bookmarks; // first:address second:name /** * Returns the bookmark address of a CPU bookmark identified by its index. @@ -763,8 +762,8 @@ std::vector bookmarks_name; **/ unsigned int getBookmarkAddress(unsigned int index) { - if (index < bookmarks_addr.size()) - return bookmarks_addr[index]; + if (index < bookmarks.size()) + return bookmarks[index].first; else return 0; } @@ -777,18 +776,15 @@ unsigned int getBookmarkAddress(unsigned int index) **/ void AddDebuggerBookmark2(HWND hwnd, unsigned int addr) { - int index = bookmarks_addr.size(); - bookmarks_addr.push_back(addr); + int index = bookmarks.size(); // try to find Symbolic name for this address Name* node = findNode(getNamesPointerForAddress(addr), addr); - if (node && node->name) - bookmarks_name.push_back(node->name); - else - bookmarks_name.push_back(""); + std::pair bookmark(addr, node && node->name ? node->name : ""); + bookmarks.push_back(bookmark); // add new item to ListBox char buffer[256]; - sprintf(buffer, "%04X %s", bookmarks_addr[index], bookmarks_name[index].c_str()); + sprintf(buffer, "%04X %s", bookmark.first, bookmark.second.c_str()); SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_ADDSTRING, 0, (LPARAM)buffer); // select this item SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_SETCURSEL, index, 0); @@ -833,13 +829,12 @@ void DeleteDebuggerBookmark(HWND hwnd) } else { // Erase the selected bookmark - bookmarks_addr.erase(bookmarks_addr.begin() + selectedItem); - bookmarks_name.erase(bookmarks_name.begin() + selectedItem); + bookmarks.erase(bookmarks.begin() + selectedItem); SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_DELETESTRING, selectedItem, 0); // Select next item - if (selectedItem >= (bookmarks_addr.size() - 1)) + if (selectedItem >= (bookmarks.size() - 1)) // select last item - SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_SETCURSEL, bookmarks_addr.size() - 1, 0); + SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_SETCURSEL, bookmarks.size() - 1, 0); else SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_SETCURSEL, selectedItem, 0); @@ -850,36 +845,33 @@ void NameDebuggerBookmark(HWND hwnd) { // Get the selected bookmark int selectedItem = SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_GETCURSEL, 0, 0); - if (selectedItem == LB_ERR || selectedItem >= (int)bookmarks_name.size()) + if (selectedItem == LB_ERR || selectedItem >= (int)bookmarks.size()) { MessageBox(hwnd, "Please select a bookmark from the list", "Error", MB_OK | MB_ICONERROR); return; } else { - char bookmarkDescription[51] = { 0 }; - if (bookmarks_name[selectedItem].size()) - strcpy(bookmarkDescription, bookmarks_name[selectedItem].c_str()); - else + std::pair bookmark = bookmarks[selectedItem]; + if (!bookmark.second.size()) { - bookmarkDescription[0] = 0; // try to find the same address in bookmarks - for (int i = bookmarks_addr.size() - 1; i>= 0; i--) + for (int i = bookmarks.size() - 1; i>= 0; i--) { - if (i != selectedItem && bookmarks_addr[i] == bookmarks_addr[selectedItem] && bookmarks_name[i].size()) + if (i != selectedItem && bookmarks[i].first == bookmarks[selectedItem].first && bookmarks[i].second.size()) { - strcpy(bookmarkDescription, bookmarks_name[i].c_str()); + bookmark.second = bookmarks[i].second; break; } } } // Show the bookmark name dialog - if (DialogBoxParam(fceu_hInstance, "NAMEBOOKMARKDLG", hwnd, nameBookmarkCallB, (LPARAM)bookmarkDescription)) + if (DialogBoxParam(fceu_hInstance, "NAMEBOOKMARKDLG", hwnd, nameBookmarkCallB, (LPARAM)&bookmark)) { // Rename the selected bookmark - bookmarks_name[selectedItem] = bookmarkDescription; + bookmarks[selectedItem] = bookmark; SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_DELETESTRING, selectedItem, 0); char buffer[256]; - sprintf(buffer, "%04X %s", bookmarks_addr[selectedItem], bookmarks_name[selectedItem].c_str()); + sprintf(buffer, "%04X %s", bookmarks[selectedItem].first, bookmarks[selectedItem].second.c_str()); SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_INSERTSTRING, selectedItem, (LPARAM)buffer); // Reselect the item (selection disappeared when it was deleted) SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_SETCURSEL, selectedItem, 0); @@ -889,17 +881,16 @@ void NameDebuggerBookmark(HWND hwnd) void DeleteAllDebuggerBookmarks() { - bookmarks_addr.resize(0); - bookmarks_name.resize(0); + bookmarks.resize(0); } void FillDebuggerBookmarkListbox(HWND hwnd) { SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_RESETCONTENT, 0, 0); char buffer[256]; - for (unsigned int i = 0; i < bookmarks_addr.size(); ++i) + for (unsigned int i = 0; i < bookmarks.size(); ++i) { - sprintf(buffer, "%04X %s", bookmarks_addr[i], bookmarks_name[i].c_str()); + sprintf(buffer, "%04X %s", bookmarks[i].first, bookmarks[i].second.c_str()); SendDlgItemMessage(hwnd, LIST_DEBUGGER_BOOKMARKS, LB_ADDSTRING, 0, (LPARAM)buffer); } } diff --git a/src/drivers/win/debuggersp.h b/src/drivers/win/debuggersp.h index 4fa50ded..41cf94f8 100644 --- a/src/drivers/win/debuggersp.h +++ b/src/drivers/win/debuggersp.h @@ -41,8 +41,7 @@ struct MemoryMappedRegister extern bool symbDebugEnabled; extern bool symbRegNames; -extern std::vector bookmarks_addr; -extern std::vector bookmarks_name; +extern std::vector> bookmarks; extern int debuggerWasActive; int checkCondition(const char* buffer, int num); diff --git a/src/drivers/win/memview.cpp b/src/drivers/win/memview.cpp index e65d55aa..214a8683 100644 --- a/src/drivers/win/memview.cpp +++ b/src/drivers/win/memview.cpp @@ -1409,13 +1409,19 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa if (wParam >= '0' && wParam <= '9') { - int bookmark = wParam - '0'; - int newValue = handleBookmarkMenu(bookmark); - - if (newValue != -1) + char buf[3]; + sprintf(buf, "%c", wParam); + int key_num; + sscanf(buf, "%d", &key_num); + key_num = (key_num + 9) % 10; + if (hexBookmarkShortcut[key_num] != -1) { - ChangeMemViewFocus(hexBookmarks[bookmark].editmode,newValue,-1); - UpdateColorTable(); + int address = hexBookmarks[hexBookmarkShortcut[key_num]].address; + if (address != -1) + { + ChangeMemViewFocus(hexBookmarks[hexBookmarkShortcut[key_num]].editmode, address, -1); + UpdateColorTable(); + } } } diff --git a/src/drivers/win/memviewsp.cpp b/src/drivers/win/memviewsp.cpp index a36de47e..3b2e6e44 100644 --- a/src/drivers/win/memviewsp.cpp +++ b/src/drivers/win/memviewsp.cpp @@ -27,6 +27,8 @@ #include "common.h" HexBookmark hexBookmarks[64]; +int hexBookmarkShortcut[10] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; +int numHexBookmarkShortcut = 0; int nextBookmark = 0; /// Finds the bookmark for a given address @@ -48,30 +50,91 @@ int findBookmark(unsigned int address, int editmode) if (hexBookmarks[i].address == address && hexBookmarks[i].editmode == editmode) return i; } - + return -1; } BOOL CenterWindow(HWND hwndDlg); /// Callback function for the name bookmark dialog +/* + TODO: The bookmarks of Debugger and Hex Editor uses the same dialog box, + but different bookmark systems, either decouple their callback into separate + functions or unify them to use the same bookmark system. +*/ INT_PTR CALLBACK nameBookmarkCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - static char* description; + // For Hex Editor + static HexBookmarkMsg* hexBookmarkMsg; + static int dlgShortcutRadioCheck[10] = { IDC_RADIO_SHORTCUT0, IDC_RADIO_SHORTCUT1, IDC_RADIO_SHORTCUT2, IDC_RADIO_SHORTCUT3, IDC_RADIO_SHORTCUT4, IDC_RADIO_SHORTCUT5, IDC_RADIO_SHORTCUT6, IDC_RADIO_SHORTCUT7, IDC_RADIO_SHORTCUT8, IDC_RADIO_SHORTCUT9 }; + + // For Debugger + extern HWND hDebug; + static std::pair* debuggerBookmark; switch (uMsg) { case WM_INITDIALOG: + { // Limit bookmark descriptions to 50 characters - SendDlgItemMessage(hwndDlg,IDC_BOOKMARK_DESCRIPTION,EM_SETLIMITTEXT,50,0); + SendDlgItemMessage(hwndDlg, IDC_BOOKMARK_DESCRIPTION, EM_SETLIMITTEXT, 50, 0); // Put the current bookmark description into the edit field - // and set focus to that edit field. + HWND parent = GetParent(hwndDlg); - description = (char*)lParam; + char addr[5]; + const char* description; + // Called from Hex Editor + if (parent == hMemView) + { + hexBookmarkMsg = (HexBookmarkMsg*)lParam; + HexBookmark* hexBookmark = hexBookmarkMsg->bookmark; + sprintf(addr, "%04X", hexBookmark->address); + description = hexBookmark->description; + + bool shortcut_assigned = hexBookmarkMsg->shortcut_index != -1; + if (shortcut_assigned) + { + CheckDlgButton(hwndDlg, IDC_CHECK_SHORTCUT, BST_CHECKED); + CheckDlgButton(hwndDlg, dlgShortcutRadioCheck[hexBookmarkMsg->shortcut_index], BST_CHECKED); + } + else + EnableWindow(GetDlgItem(hwndDlg, IDC_BOOKMARK_SHORTCUT_PREFIX_TEXT), FALSE); + + for (int i = 0; i < 10; ++i) + if (!shortcut_assigned || hexBookmarkShortcut[i] != -1 && hexBookmarkShortcut[i] != hexBookmarkMsg->bookmark_index) + // the shortcut number is occupied but it doesn't belongs to this bookmark, or the bookmark doesn't have a shortcut + EnableWindow(GetDlgItem(hwndDlg, dlgShortcutRadioCheck[i]), FALSE); + + if (!shortcut_assigned && numHexBookmarkShortcut >= 10) + { + // all the shortcuts are occupied and this one doesn't have a shortcut, it's impossible to assign a new shortcut + EnableWindow(GetDlgItem(hwndDlg, IDC_CHECK_SHORTCUT), FALSE); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOOKMARK_SHORTCUT_PREFIX_TEXT), FALSE); + } + } + // Called from Debugger + else if (parent == hDebug) + { + debuggerBookmark = (std::pair*)lParam; + sprintf(addr, "%04X", debuggerBookmark->first); + description = debuggerBookmark->second.c_str(); + + // Hide the shortcut panel since it doesn't support jump to address shortcut keys. + ShowWindow(GetDlgItem(hwndDlg, IDC_CHECK_SHORTCUT), SW_HIDE); + ShowWindow(GetDlgItem(hwndDlg, IDC_BOOKMARK_SHORTCUT_PREFIX_TEXT), SW_HIDE); + for (int i = 0; i < 10; ++i) + ShowWindow(GetDlgItem(hwndDlg, dlgShortcutRadioCheck[i]), SW_HIDE); + } + + // Set address and description + SetDlgItemText(hwndDlg, IDC_BOOKMARK_ADDRESS, addr); SetDlgItemText(hwndDlg, IDC_BOOKMARK_DESCRIPTION, description); + + // and set focus to that edit field. SetFocus(GetDlgItem(hwndDlg, IDC_BOOKMARK_DESCRIPTION)); break; + } case WM_CLOSE: case WM_QUIT: EndDialog(hwndDlg, 0); @@ -82,10 +145,47 @@ INT_PTR CALLBACK nameBookmarkCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA case BN_CLICKED: switch(LOWORD(wParam)) { + case IDC_CHECK_SHORTCUT: + { + UINT shortcut_assigned = IsDlgButtonChecked(hwndDlg, IDC_CHECK_SHORTCUT); + EnableWindow(GetDlgItem(hwndDlg, IDC_BOOKMARK_SHORTCUT_PREFIX_TEXT), shortcut_assigned); + + for (int i = 0; i < 10; ++i) + EnableWindow(GetDlgItem(hwndDlg, dlgShortcutRadioCheck[i]), shortcut_assigned && (hexBookmarkShortcut[i] == -1 || hexBookmarkShortcut[i] == hexBookmarkMsg->bookmark_index)); + } + break; case IDOK: { - // Update the bookmark description - GetDlgItemText(hwndDlg, IDC_BOOKMARK_DESCRIPTION, description, 50); + HWND parent = GetParent(hwndDlg); + // Called from Hex Editor + if (parent == hMemView) + { + // Update the bookmark description + GetDlgItemText(hwndDlg, IDC_BOOKMARK_DESCRIPTION, hexBookmarkMsg->bookmark->description, 50); + + // Update the shortcut key + if (hexBookmarkMsg->shortcut_index != -1 && hexBookmarkShortcut[hexBookmarkMsg->shortcut_index] != -1) + { + hexBookmarkShortcut[hexBookmarkMsg->shortcut_index] = -1; + --numHexBookmarkShortcut; + } + + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_SHORTCUT)) + for (int i = 0; i < 10; ++i) + if(IsDlgButtonChecked(hwndDlg, dlgShortcutRadioCheck[i])) + { + // Update the shortcut index + hexBookmarkShortcut[i] = hexBookmarkMsg->bookmark_index; + ++numHexBookmarkShortcut; + break; + } + } + else if (parent == hDebug) + { + char description[51]; + GetDlgItemText(hwndDlg, IDC_BOOKMARK_DESCRIPTION, description, 50); + debuggerBookmark->second = description; + } EndDialog(hwndDlg, 1); break; } @@ -107,21 +207,39 @@ int addBookmark(HWND hwnd, unsigned int address, int editmode) // Enforce a maximum of 64 bookmarks if (nextBookmark < 64) { - char description[51] = { 0 }; - sprintf(description, "%s %04X", EditString[editmode], address); - + hexBookmarks[nextBookmark].address = address; + hexBookmarks[nextBookmark].editmode = editmode; + sprintf(hexBookmarks[nextBookmark].description, "%s %04X", EditString[editmode], address); + + HexBookmarkMsg msg; + + // Pre-define a shortcut if possible + for (int i = 0; i < 10; ++i) + if (hexBookmarkShortcut[i] == -1) + { + msg.shortcut_index = i; + break; + } + + msg.bookmark = &hexBookmarks[nextBookmark]; + msg.bookmark_index = nextBookmark; + // Show the bookmark name dialog - if (DialogBoxParam(fceu_hInstance, "NAMEBOOKMARKDLG", hwnd, nameBookmarkCallB, (LPARAM)description)) + if (DialogBoxParam(fceu_hInstance, "NAMEBOOKMARKDLG", hwnd, nameBookmarkCallB, (LPARAM)&msg)) { - // Add the bookmark - hexBookmarks[nextBookmark].address = address; - hexBookmarks[nextBookmark].editmode = editmode; - strcpy(hexBookmarks[nextBookmark].description, description); nextBookmark++; return 0; } else + { + if (msg.shortcut_index != -1) + { + if (hexBookmarkShortcut[msg.shortcut_index] != -1) + --numHexBookmarkShortcut; + hexBookmarkShortcut[msg.shortcut_index] = -1; + } return 1; + } } else return -1; @@ -135,16 +253,21 @@ int editBookmark(HWND hwnd, unsigned int index) { if (index >= 64) return -1; - char description[51] = { 0 }; - strcpy(description, hexBookmarks[index].description); + HexBookmarkMsg msg; + msg.bookmark = &hexBookmarks[index]; + msg.bookmark_index = index; + + // find its shortcut index + for (int i = 0; i < 10; ++i) + if (index == hexBookmarkShortcut[i]) + { + msg.shortcut_index = i; + break; + } // Show the bookmark name dialog - if (DialogBoxParam(fceu_hInstance, "NAMEBOOKMARKDLG", hwnd, nameBookmarkCallB, (LPARAM)description)) - { - // Update the bookmark information - strcpy(hexBookmarks[index].description, description); + if (DialogBoxParam(fceu_hInstance, "NAMEBOOKMARKDLG", hwnd, nameBookmarkCallB, (LPARAM)&msg)) return 0; - } else return 1; @@ -158,6 +281,20 @@ int removeBookmark(unsigned int index) { if (index >= 64) return -1; + // remove its related shortcut + for (int i = 0; i < 10; ++i) + { + // all the indexes after the deleted one sould decrease by 1 + if (hexBookmarkShortcut[i] != -1 && hexBookmarkShortcut[i] > index) + --hexBookmarkShortcut[i]; + else if (hexBookmarkShortcut[i] == index) + { + // delete the shortcut index itself + hexBookmarkShortcut[i] = -1; + --numHexBookmarkShortcut; + } + } + // At this point it's necessary to move the content of the bookmark list for (int i=index;i= 256) return 1; if (fread(&buffer, 1, len, f) != len) return 1; buffer[len] = 0; - bookmarks_name[i] = buffer; + bookmarks[i].second = buffer; } myNumWPs = 0; @@ -358,7 +369,27 @@ int loadHexPreferences(FILE* f) // Read the bookmark description if (fread(hexBookmarks[i].description, 1, len, f) != len) return 1; } - + + // optional section: read bookmark shortcut matches + // read number of shortcuts + // older versions of .deb file don't have this section, so the file would reach the end. + if (fread(&numHexBookmarkShortcut, sizeof(numHexBookmarkShortcut), 1, f) != EOF) + { + unsigned int bookmark_index, shortcut_index; + // read the matching index list of the shortcuts + for (unsigned int i = 0; i < numHexBookmarkShortcut; ++i) + if (fread(&bookmark_index, sizeof(bookmark_index), 1, f) != EOF && fread(&shortcut_index, sizeof(shortcut_index), 1, f) != EOF) + hexBookmarkShortcut[shortcut_index % 10] = bookmark_index; + else + break; + } + else { + // use the default configruation based on the order of the bookmark list + numHexBookmarkShortcut = nextBookmark > 10 ? 10 : nextBookmark; + for (int i = 0; i < numHexBookmarkShortcut; ++i) + hexBookmarkShortcut[i] = i; + } + return 0; } diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index 3fd4e358..3daca457 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -1901,14 +1901,28 @@ BEGIN LISTBOX IDC_ASSEMBLER_PATCH_DISASM,7,50,188,59,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP END -NAMEBOOKMARKDLG DIALOGEX 0, 0, 186, 73 +NAMEBOOKMARKDLG DIALOGEX 0, 0, 269, 79 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Bookmark name" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - LTEXT "Bookmark name",IDC_BOOKMARK_NAME_TEXT,68,14,58,8 - EDITTEXT IDC_BOOKMARK_DESCRIPTION,7,28,172,14,ES_AUTOHSCROLL - DEFPUSHBUTTON "&OK",IDOK,67,52,50,14 + LTEXT "&Address:",IDC_BOOKMARK_ADDRESS_TEXT,7,10,30,8 + EDITTEXT IDC_BOOKMARK_ADDRESS,42,7,48,14,ES_UPPERCASE | ES_AUTOHSCROLL | ES_READONLY + LTEXT "&Name:",IDC_BOOKMARK_NAME_TEXT,7,27,23,8 + EDITTEXT IDC_BOOKMARK_DESCRIPTION,42,25,220,14,ES_AUTOHSCROLL + DEFPUSHBUTTON "&OK",IDOK,107,58,50,14 + CONTROL "&Shortcut:",IDC_CHECK_SHORTCUT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,44,46,10 + LTEXT "Ctrl+",IDC_BOOKMARK_SHORTCUT_PREFIX_TEXT,54,45,17,8 + CONTROL "&1",IDC_RADIO_SHORTCUT0,"Button",BS_AUTORADIOBUTTON,73,44,18,10 + CONTROL "&2",IDC_RADIO_SHORTCUT1,"Button",BS_AUTORADIOBUTTON,92,44,18,10 + CONTROL "&3",IDC_RADIO_SHORTCUT2,"Button",BS_AUTORADIOBUTTON,111,44,18,10 + CONTROL "&4",IDC_RADIO_SHORTCUT3,"Button",BS_AUTORADIOBUTTON,130,44,18,10 + CONTROL "&5",IDC_RADIO_SHORTCUT4,"Button",BS_AUTORADIOBUTTON,149,44,18,10 + CONTROL "&6",IDC_RADIO_SHORTCUT5,"Button",BS_AUTORADIOBUTTON,168,44,18,10 + CONTROL "&7",IDC_RADIO_SHORTCUT6,"Button",BS_AUTORADIOBUTTON,187,44,18,10 + CONTROL "&8",IDC_RADIO_SHORTCUT7,"Button",BS_AUTORADIOBUTTON,206,44,18,10 + CONTROL "&9",IDC_RADIO_SHORTCUT8,"Button",BS_AUTORADIOBUTTON,225,44,18,10 + CONTROL "&0",IDC_RADIO_SHORTCUT9,"Button",BS_AUTORADIOBUTTON,244,44,18,10 END CDLOGGER DIALOGEX 0, 0, 307, 254 @@ -2589,9 +2603,9 @@ BEGIN "NAMEBOOKMARKDLG", DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 179 + RIGHTMARGIN, 262 TOPMARGIN, 7 - BOTTOMMARGIN, 66 + BOTTOMMARGIN, 72 END "CDLOGGER", DIALOG @@ -2948,7 +2962,7 @@ IDB_BITMAP_SELECTED17 BITMAP "res\\te_17_selected.bmp" IDB_BITMAP_SELECTED18 BITMAP "res\\te_18_selected.bmp" IDB_BITMAP_SELECTED19 BITMAP "res\\te_19_selected.bmp" IDB_BRANCH_SPRITESHEET BITMAP "res\\branch_spritesheet.bmp" -#endif // English(United States) resources +#endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// diff --git a/src/drivers/win/resource.h b/src/drivers/win/resource.h index 1c2fd941..a6696e94 100644 --- a/src/drivers/win/resource.h +++ b/src/drivers/win/resource.h @@ -472,6 +472,7 @@ #define MW_ADDR00 1001 #define IDC_MEMVIEWFIND_TYPE_HEX 1001 #define IDC_NTVIEW_MIRROR_HORIZONTAL 1001 +#define IDC_BOOKMARK_ADDRESS 1001 #define IDC_CHECK_STOPMOVIE 1002 #define IDC_GAME_GENIE_COMP 1002 #define IDC_MEMVIEWFIND_TYPE_TEXT 1002 @@ -508,6 +509,7 @@ #define MW_ADDR04 1013 #define IDC_CHECK1 1013 #define IDC_CHEAT_AUTOLOADSAVE 1013 +#define IDC_CHECK_SHORTCUT 1013 #define IDC_RESTORE_BUTTON 1014 #define MW_VAL04 1014 #define MW_NAME05 1015 @@ -629,6 +631,16 @@ #define IDC_GAME_GENIE_LABEL 1097 #define IDC_CHEAT_GAME_GENIE_TEXT 1098 #define IDC_CHECK2 1099 +#define IDC_RADIO_SHORTCUT1 1100 +#define IDC_RADIO_SHORTCUT2 1101 +#define IDC_RADIO_SHORTCUT3 1102 +#define IDC_RADIO_SHORTCUT4 1103 +#define IDC_RADIO_SHORTCUT5 1104 +#define IDC_RADIO_SHORTCUT6 1105 +#define IDC_RADIO_SHORTCUT7 1106 +#define IDC_RADIO_SHORTCUT8 1107 +#define IDC_RADIO_SHORTCUT9 1108 +#define IDC_RADIO_SHORTCUT0 1109 #define BTN_ALLOW_LRUD 1117 #define IDC_PRGROM_EDIT 1118 #define IDC_CHRROM_EDIT 1119 @@ -1142,15 +1154,17 @@ #define MW_VALUELABEL1 65426 #define IDC_STATIC_SLASHTEXT 65442 #define IDC_BOOKMARK_NAME_TEXT 65532 +#define IDC_BOOKMARK_ADDRESS_TEXT 65533 #define IDC_NTVIEW_SCANLINE_TEXT 65534 +#define IDC_BOOKMARK_SHORTCUT_PREFIX_TEXT 65534 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 305 +#define _APS_NEXT_RESOURCE_VALUE 306 #define _APS_NEXT_COMMAND_VALUE 40002 -#define _APS_NEXT_CONTROL_VALUE 1100 +#define _APS_NEXT_CONTROL_VALUE 1101 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif