fix(launch): cannot launch game in path that contains CJK characters. Closes #1141.

This commit is contained in:
huanghongxun 2021-10-30 23:03:49 +08:00
parent 46385a8445
commit f67c3d5284

View File

@ -212,7 +212,8 @@ public class DefaultLauncher extends Launcher {
configuration.put("${game_assets}", gameAssets.toAbsolutePath().toString());
configuration.put("${assets_root}", gameAssets.toAbsolutePath().toString());
// lwjgl assumes path to native libraries encoded by ASCII.
// Here is a workaround for this issue: https://github.com/huanghongxun/HMCL/issues/1141.
String nativeFolderPath = nativeFolder.getAbsolutePath();
Path tempNativeFolder = null;
if (OperatingSystem.CURRENT_OS == OperatingSystem.LINUX