Initial commit
This commit is contained in:
19
game_payload/src/game.c
Normal file
19
game_payload/src/game.c
Normal file
@ -0,0 +1,19 @@
|
||||
#include <err.h>
|
||||
#include <hi3.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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user