diff --git a/desmume/src/frontend/windows/cheatsWin.cpp b/desmume/src/frontend/windows/cheatsWin.cpp index 416a4b75a..bd4c8ddf9 100644 --- a/desmume/src/frontend/windows/cheatsWin.cpp +++ b/desmume/src/frontend/windows/cheatsWin.cpp @@ -58,6 +58,7 @@ static u8 cheatXXtype = 0; static u8 cheatXXaction = 0; static s32 draggedItem = -1; static s32 highlightedItem = -1; +static bool multiCheck = false; static HWND searchWnd = NULL; static HWND searchListView = NULL; @@ -852,6 +853,21 @@ INT_PTR CALLBACK CheatsListBox_Proc(HWND dialog, UINT msg,WPARAM wparam,LPARAM l EnableWindow(GetDlgItem(dialog, IDOK), TRUE); } } + + // check all other selected items too + if (!multiCheck) + { + multiCheck = true; + bool check = ListView_GetCheckState(cheatListView, cheatEditPos); + int index = ListView_GetNextItem(cheatListView, -1, LVNI_SELECTED); + while (index != -1) + { + if (index != cheatEditPos) + ListView_SetCheckState(cheatListView, index, check); + index = ListView_GetNextItem(cheatListView, index, LVNI_SELECTED); + } + multiCheck = false; + } } break;