add changeable config path

This commit is contained in:
2024-12-16 11:09:38 +08:00
parent 6d8ffb46ef
commit 11556a1332
37 changed files with 134 additions and 63 deletions

11
util/env.c Normal file
View File

@ -0,0 +1,11 @@
#include "env.h"
const wchar_t* get_config_path() {
static wchar_t path[MAX_PATH];
if (!GetEnvironmentVariableW(L"SEGATOOLS_CONFIG_PATH", path, MAX_PATH))
{
return L".\\segatools.ini";
}
return path;
}