From e4d2e04f4823c27ee58ac21efd7a002299be55af Mon Sep 17 00:00:00 2001 From: feos Date: Thu, 25 Apr 2019 20:27:02 +0300 Subject: [PATCH] require HOOK_CPU definition in cpuhook.c --- core/debug/cpuhook.c | 8 +++++++- core/debug/cpuhook.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/debug/cpuhook.c b/core/debug/cpuhook.c index b8c5b5b..1e58835 100644 --- a/core/debug/cpuhook.c +++ b/core/debug/cpuhook.c @@ -2,6 +2,8 @@ * Genesis Plus GX * CPU hooking support * + * HOOK_CPU should be defined in a makefile or MSVC project to enable this functionality + * * Copyright feos (2019) * * Redistribution and use of this code or any derivative works are permitted @@ -36,6 +38,8 @@ * ****************************************************************************************/ +#ifdef HOOK_CPU + #include #include "cpuhook.h" @@ -44,4 +48,6 @@ void(*cpu_hook)(hook_type_t type, int width, unsigned int address, unsigned int void set_cpu_hook(void(*hook)(hook_type_t type, int width, unsigned int address, unsigned int value)) { cpu_hook = hook; -} \ No newline at end of file +} + +#endif /* HOOK_CPU */ \ No newline at end of file diff --git a/core/debug/cpuhook.h b/core/debug/cpuhook.h index 67af2c2..1fea3ec 100644 --- a/core/debug/cpuhook.h +++ b/core/debug/cpuhook.h @@ -2,6 +2,8 @@ * Genesis Plus GX * CPU hooking support * + * HOOK_CPU should be defined in a makefile or MSVC project to enable this functionality + * * Copyright DrMefistO (2018-2019) * * Copyright feos (2019)