Make HMCLLauncher find Java in more places

This commit is contained in:
Glavo
2022-02-08 00:24:14 +08:00
committed by Yuhui Huang
parent 1b9b0226f2
commit 20ddf60c48
3 changed files with 62 additions and 33 deletions

View File

@@ -102,7 +102,7 @@ HRESULT MySHGetFolderPath(int csidl, std::wstring &out) {
out = std::wstring();
out.resize(MAX_PATH);
HRESULT res = SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, &out[0]);
HRESULT res = SHGetFolderPath(NULL, csidl, NULL, 0, &out[0]);
if (SUCCEEDED(res)) {
out.resize(wcslen(&out[0]));
} else {