diff --git a/src/cheat.h b/src/cheat.h index 9e8476b4..84e75ef7 100644 --- a/src/cheat.h +++ b/src/cheat.h @@ -1,3 +1,5 @@ +#ifndef CHEAT_H +#define CHEAT_H void FCEU_CheatResetRAM(void); void FCEU_CheatAddRAM(int s, uint32 A, uint8 *p); @@ -59,3 +61,4 @@ struct SEARCHPOSSIBLE { for (int i = 0; i < numsubcheats && count < size; ++i) \ if (SubCheats[i].addr >= address && SubCheats[i].addr < address + size) \ ++count +#endif \ No newline at end of file diff --git a/src/driver.h b/src/driver.h index 4ce67eeb..496ab636 100644 --- a/src/driver.h +++ b/src/driver.h @@ -192,7 +192,6 @@ int FCEUI_AddCheat(const char *name, uint32 addr, uint8 val, int compare, int ty int FCEUI_DelCheat(uint32 which); int FCEUI_ToggleCheat(uint32 which); int FCEUI_GlobalToggleCheat(int global_enable); -void FCEU_SaveGameCheats(FILE *fp, int release = 0); int32 FCEUI_CheatSearchGetCount(void); void FCEUI_CheatSearchGetRange(uint32 first, uint32 last, int (*callb)(uint32 a, uint8 last, uint8 current)); diff --git a/src/drivers/common/cheat.h b/src/drivers/common/cheat.h index 77619fe3..d8dc8f60 100644 --- a/src/drivers/common/cheat.h +++ b/src/drivers/common/cheat.h @@ -17,5 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ - +#ifndef COMMON_CHEAT_H +#define COMMON_CHEAT_H void DoConsoleCheatConfig(void); +#endif \ No newline at end of file diff --git a/src/drivers/win/cheat.cpp b/src/drivers/win/cheat.cpp index d6eb59d6..b6cd9b27 100644 --- a/src/drivers/win/cheat.cpp +++ b/src/drivers/win/cheat.cpp @@ -975,8 +975,9 @@ void UpdateCheatListGroupBoxUI() EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_ADD), FALSE); EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_ADDFROMFILE), FALSE); } - SetDlgItemText(hCheat, IDC_GROUPBOX_CHEATLIST, temp); + + EnableWindow(GetDlgItem(hCheat, IDC_BTN_CHEAT_EXPORTTOFILE), cheats != 0); } //Used by cheats and external dialogs such as hex editor to update items in the cheat search dialog diff --git a/src/drivers/win/cheat.h b/src/drivers/win/cheat.h index 7552746c..af9d7689 100644 --- a/src/drivers/win/cheat.h +++ b/src/drivers/win/cheat.h @@ -1,5 +1,7 @@ //-- //mbg merge 7/18/06 had to make these extern +#ifndef WIN_CHEAT_H +#define WIN_CHEAT_H extern int CheatWindow,CheatStyle; //bbit edited: this line added extern HWND hCheat; @@ -44,4 +46,4 @@ SetDlgItemText(hwnd, IDC_CHEAT_VAL, (LPTSTR)"") & \ SetDlgItemText(hwnd, IDC_CHEAT_COM, (LPTSTR)"") & \ SetDlgItemText(hwnd, IDC_CHEAT_NAME, (LPTSTR)"") & \ SetDlgItemText(hwnd, IDC_CHEAT_TEXT, (LPTSTR)"")) - +#endif \ No newline at end of file