Merge branch 'master' into master
This commit is contained in:
commit
996c559931
6 changed files with 18 additions and 9 deletions
|
@ -141,7 +141,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||||
|
|
||||||
if (algorithm == CompressionAlgorithm.Deflate)
|
if (algorithm == CompressionAlgorithm.Deflate)
|
||||||
{
|
{
|
||||||
_activeStream = new DeflateStream(_stream, CompressionLevel.SmallestSize, true);
|
_activeStream = new DeflateStream(_stream, CompressionLevel.Fastest, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
|
||||||
stream.Write(data);
|
stream.Write(data);
|
||||||
break;
|
break;
|
||||||
case CompressionAlgorithm.Deflate:
|
case CompressionAlgorithm.Deflate:
|
||||||
stream = new DeflateStream(stream, CompressionLevel.SmallestSize, true);
|
stream = new DeflateStream(stream, CompressionLevel.Fastest, true);
|
||||||
stream.Write(data);
|
stream.Write(data);
|
||||||
stream.Dispose();
|
stream.Dispose();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -181,21 +181,24 @@ namespace Ryujinx
|
||||||
{
|
{
|
||||||
// No configuration, we load the default values and save it to disk
|
// No configuration, we load the default values and save it to disk
|
||||||
ConfigurationPath = appDataConfigurationPath;
|
ConfigurationPath = appDataConfigurationPath;
|
||||||
|
Logger.Notice.Print(LogClass.Application, $"No configuration file found. Saving default configuration to: {ConfigurationPath}");
|
||||||
|
|
||||||
ConfigurationState.Instance.LoadDefault();
|
ConfigurationState.Instance.LoadDefault();
|
||||||
ConfigurationState.Instance.ToFileFormat().SaveConfig(ConfigurationPath);
|
ConfigurationState.Instance.ToFileFormat().SaveConfig(ConfigurationPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Logger.Notice.Print(LogClass.Application, $"Loading configuration from: {ConfigurationPath}");
|
||||||
|
|
||||||
if (ConfigurationFileFormat.TryLoad(ConfigurationPath, out ConfigurationFileFormat configurationFileFormat))
|
if (ConfigurationFileFormat.TryLoad(ConfigurationPath, out ConfigurationFileFormat configurationFileFormat))
|
||||||
{
|
{
|
||||||
ConfigurationState.Instance.Load(configurationFileFormat, ConfigurationPath);
|
ConfigurationState.Instance.Load(configurationFileFormat, ConfigurationPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ConfigurationState.Instance.LoadDefault();
|
Logger.Warning?.PrintMsg(LogClass.Application, $"Failed to load config! Loading the default config instead.\nFailed config location: {ConfigurationPath}");
|
||||||
|
|
||||||
Logger.Warning?.PrintMsg(LogClass.Application, $"Failed to load config! Loading the default config instead.\nFailed config location {ConfigurationPath}");
|
ConfigurationState.Instance.LoadDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace Ryujinx.UI.App.Common
|
||||||
|
|
||||||
if (!System.IO.Path.Exists(titleFilePath))
|
if (!System.IO.Path.Exists(titleFilePath))
|
||||||
{
|
{
|
||||||
Logger.Error?.Print(LogClass.Application, $"File does not exists. {titleFilePath}");
|
Logger.Error?.Print(LogClass.Application, $"File \"{titleFilePath}\" does not exist.");
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ namespace Ryujinx.UI.App.Common
|
||||||
|
|
||||||
if (!Directory.Exists(appDir))
|
if (!Directory.Exists(appDir))
|
||||||
{
|
{
|
||||||
Logger.Warning?.Print(LogClass.Application, $"The \"game_dirs\" section in \"{ReleaseInformation.ConfigName}\" contains an invalid directory: \"{appDir}\"");
|
Logger.Warning?.Print(LogClass.Application, $"The specified game directory \"{appDir}\" does not exist.");
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ using Ryujinx.UI.Common.Configuration.UI;
|
||||||
using Ryujinx.UI.Common.Helper;
|
using Ryujinx.UI.Common.Helper;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Text.Json.Nodes;
|
using System.Text.Json.Nodes;
|
||||||
|
|
||||||
namespace Ryujinx.UI.Common.Configuration
|
namespace Ryujinx.UI.Common.Configuration
|
||||||
|
@ -1594,7 +1595,9 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
|
|
||||||
private static void LogValueChange<T>(ReactiveEventArgs<T> eventArgs, string valueName)
|
private static void LogValueChange<T>(ReactiveEventArgs<T> eventArgs, string valueName)
|
||||||
{
|
{
|
||||||
Ryujinx.Common.Logging.Logger.Info?.Print(LogClass.Configuration, $"{valueName} set to: {eventArgs.NewValue}");
|
string message = string.Create(CultureInfo.InvariantCulture, $"{valueName} set to: {eventArgs.NewValue}");
|
||||||
|
|
||||||
|
Ryujinx.Common.Logging.Logger.Info?.Print(LogClass.Configuration, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Initialize()
|
public static void Initialize()
|
||||||
|
|
|
@ -148,21 +148,24 @@ namespace Ryujinx.Ava
|
||||||
{
|
{
|
||||||
// No configuration, we load the default values and save it to disk
|
// No configuration, we load the default values and save it to disk
|
||||||
ConfigurationPath = appDataConfigurationPath;
|
ConfigurationPath = appDataConfigurationPath;
|
||||||
|
Logger.Notice.Print(LogClass.Application, $"No configuration file found. Saving default configuration to: {ConfigurationPath}");
|
||||||
|
|
||||||
ConfigurationState.Instance.LoadDefault();
|
ConfigurationState.Instance.LoadDefault();
|
||||||
ConfigurationState.Instance.ToFileFormat().SaveConfig(ConfigurationPath);
|
ConfigurationState.Instance.ToFileFormat().SaveConfig(ConfigurationPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Logger.Notice.Print(LogClass.Application, $"Loading configuration from: {ConfigurationPath}");
|
||||||
|
|
||||||
if (ConfigurationFileFormat.TryLoad(ConfigurationPath, out ConfigurationFileFormat configurationFileFormat))
|
if (ConfigurationFileFormat.TryLoad(ConfigurationPath, out ConfigurationFileFormat configurationFileFormat))
|
||||||
{
|
{
|
||||||
ConfigurationState.Instance.Load(configurationFileFormat, ConfigurationPath);
|
ConfigurationState.Instance.Load(configurationFileFormat, ConfigurationPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ConfigurationState.Instance.LoadDefault();
|
Logger.Warning?.PrintMsg(LogClass.Application, $"Failed to load config! Loading the default config instead.\nFailed config location: {ConfigurationPath}");
|
||||||
|
|
||||||
Logger.Warning?.PrintMsg(LogClass.Application, $"Failed to load config! Loading the default config instead.\nFailed config location {ConfigurationPath}");
|
ConfigurationState.Instance.LoadDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue