Fixes Launcher not playing correctly on Linux when save folder does not exist.

pull/45/head
Miepee 3 years ago
parent ca88091cd1
commit d1419c6a08

@ -445,9 +445,9 @@ public partial class MainForm : Form
{
await Task.Run(() => Profile.RunGame(profile, createDebugLogs));
}
catch
catch(Exception ex)
{
// ignore any errors that occur.
MessageBox.Show($"{Text.UnhandledException}\n*****Stack Trace*****\n\n{ex}", Text.ErrorWindowTitle, MessageBoxType.Error);
}
ShowInTaskbar = true;

@ -768,7 +768,10 @@ public static class Profile
// has fullscreen set to false, so they don't run into any issues. Game will handle the rest.
string am2rConfigPath = profile.SaveLocation.Replace("~", CrossPlatformOperations.Home) + "/config.ini";
if (!File.Exists(am2rConfigPath))
{
Directory.CreateDirectory(Path.GetDirectoryName(am2rConfigPath));
File.WriteAllText(am2rConfigPath, "[Screen]\nFullscreen=\"0\"\nScale=\"3\"");
}
ProcessStartInfo startInfo = new ProcessStartInfo
{

Loading…
Cancel
Save