Fixed steam crash with a workaround

This commit is contained in:
Anuken
2019-10-01 17:35:23 -04:00
parent 4bc37ab065
commit 251b8deb25
2 changed files with 12 additions and 1 deletions

View File

@ -388,7 +388,10 @@ public class Control implements ApplicationListener, Loadable{
saves.update();
//update and load any requested assets
assets.update();
try{
assets.update();
}catch(Exception ignored){
}
input.updateState();

View File

@ -26,7 +26,9 @@ import io.anuke.mindustry.net.*;
import io.anuke.mindustry.net.Net.*;
import io.anuke.mindustry.ui.*;
import java.io.*;
import java.net.*;
import java.nio.charset.*;
import java.util.*;
import static io.anuke.mindustry.Vars.*;
@ -37,6 +39,12 @@ public class DesktopLauncher extends ClientLauncher{
boolean useDiscord = OS.is64Bit, showConsole = OS.getPropertyNotNull("user.name").equals("anuke");
static{
if(!Charset.forName("US-ASCII").newEncoder().canEncode(System.getProperty("user.name", ""))){
System.setProperty("com.codedisaster.steamworks.SharedLibraryExtractPath", new File("").getAbsolutePath());
}
}
public static void main(String[] arg){
try{
new SdlApplication(new DesktopLauncher(arg), new SdlConfig(){{