#include #include void game_detect(struct game_data *buf) { wchar_t exePath[MAX_PATH]; GetModuleFileNameW(NULL, exePath, MAX_PATH); wchar_t *exeName = wcsrchr(exePath, L'\\') + 1; wcslwr(exeName); // Only HI3 is supported for now if (wcscmp(exeName, L"bh3.exe") == 0) { hi3_fill_data(buf); } else { err_mb_w(L"Unknown game: %ls", exeName); } }