Skip to content

Commit

Permalink
release 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
aap committed Sep 6, 2017
1 parent e29560a commit a075a08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/debugmenu_public.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ typedef void (*DebugMenuEntrySetAddress_TYPE)(DebugMenuEntry *e, void *addr);

struct DebugMenuAPI
{
bool isLoaded;
DebugMenuAddInt8_TYPE addint8;
DebugMenuAddInt16_TYPE addint16;
DebugMenuAddInt32_TYPE addint32;
Expand Down Expand Up @@ -70,6 +71,8 @@ inline void DebugMenuEntrySetAddress(DebugMenuEntry *e, void *addr)

inline bool DebugMenuLoad(void)
{
if(gDebugMenuAPI.isLoaded)
return true;
HMODULE mod = LoadLibrary("debugmenu.dll");
if(mod == 0){
char modulePath[MAX_PATH];
Expand Down Expand Up @@ -97,6 +100,7 @@ inline bool DebugMenuLoad(void)
gDebugMenuAPI.setwrap = (DebugMenuEntrySetWrap_TYPE)GetProcAddress(mod, "DebugMenuEntrySetWrap");
gDebugMenuAPI.setstrings = (DebugMenuEntrySetStrings_TYPE)GetProcAddress(mod, "DebugMenuEntrySetStrings");
gDebugMenuAPI.setaddress = (DebugMenuEntrySetAddress_TYPE)GetProcAddress(mod, "DebugMenuEntrySetAddress");
gDebugMenuAPI.isLoaded = true;
return true;
}

Expand Down

0 comments on commit a075a08

Please sign in to comment.