diff --git a/QTfrontend/main.cpp b/QTfrontend/main.cpp --- a/QTfrontend/main.cpp +++ b/QTfrontend/main.cpp @@ -265,10 +265,10 @@ checkForDir(cfgdir->absolutePath() + "/Library/Application Support/Hedgewars"); cfgdir->cd("Library/Application Support/Hedgewars"); #elif defined _WIN32 - char path[1024]; - if(!SHGetFolderPathA(0, CSIDL_PERSONAL, NULL, 0, path)) + ushort path[MAX_PATH]; + if(!SHGetFolderPathW(0, CSIDL_PERSONAL, NULL, 0, (LPWSTR)path)) { - cfgdir->cd(path); + cfgdir->cd(QString::fromUtf16(path)); checkForDir(cfgdir->absolutePath() + "/Hedgewars"); cfgdir->cd("Hedgewars"); } diff --git a/hedgewars/uPhysFSLayer.pas b/hedgewars/uPhysFSLayer.pas --- a/hedgewars/uPhysFSLayer.pas +++ b/hedgewars/uPhysFSLayer.pas @@ -137,7 +137,7 @@ procedure pfsMount(path: ansistring; mountpoint: PChar); begin - if PHYSFS_mount(PChar(path), mountpoint, false) then + if PHYSFS_mount(PChar(AnsiToUtf8(path)), mountpoint, false) then AddFileLog('[PhysFS] mount ' + shortstring(path) + ' at ' + shortstring(mountpoint) + ' : ok') else AddFileLog('[PhysFS] mount ' + shortstring(path) + ' at ' + shortstring(mountpoint) + ' : FAILED ("' + shortstring(PHYSFS_getLastError()) + '")');