jadeite/game_payload/src/game.c

19 lines
413 B
C
Raw Normal View History

2023-06-05 21:23:08 +00:00
#include <err.h>
#include <game.h>
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);
}
}