fixes for vs

This commit is contained in:
Asuro
2025-02-08 02:21:52 +01:00
parent b263c3aa82
commit 14e923873a
4 changed files with 19 additions and 9 deletions

View File

@@ -7,7 +7,7 @@
#include <bx/string.h>
#include <bgfx/bgfx.h>
//#define VISUAL_STUDIO
#define VISUAL_STUDIO
typedef void (*Startup)(void*);
typedef void (*Update)();
@@ -16,7 +16,7 @@ typedef void (*Shutdown)();
constexpr UINT WM_CUSTOM_DLL_CHANGE = WM_USER + 1;
#ifdef VISUAL_STUDIO
const char* DLLPath = "Debug/PuzGame.dll";
const char* DLLPath = "PuzGame2.dll";
#else
const char* DLLPath = "libPuzGame.dll";
#endif
@@ -166,7 +166,7 @@ bool ReloadDLL()
}
#ifdef VISUAL_STUDIO
Shutdown ShutdownReloaded = (Shutdown)GetProcAddress(DevData.GameLib, "_ZN4Game8ShutdownEv");
Shutdown ShutdownReloaded = (Shutdown)GetProcAddress(DevData.GameLib, "?Shutdown@Game@@YAXXZ");
#else
Shutdown ShutdownReloaded = (Shutdown)GetProcAddress(DevData.GameLib, "_ZN4Game8ShutdownEv");
#endif
@@ -189,6 +189,11 @@ int main()
HWND window = InitWindow();
if (window == NULL) return 1;
char PathBuf[512]{ 0 };
GetCurrentDirectory(sizeof(PathBuf), PathBuf);
printf("Current path: %s", PathBuf);
if (!ReloadDLL()) return 1;
DWORD fileWatcherThreadId = 0;