fixed a bug and completed requested changes

This commit is contained in:
Xpl0itR 2019-09-02 12:32:19 +01:00
parent 4b398f04d3
commit b942993717
No known key found for this signature in database
GPG key ID: 91798184109676AD
4 changed files with 23 additions and 11 deletions

View file

@ -1536,7 +1536,7 @@ check {
min-height: 18px;
min-width: 18px;
animation: none;
background-color: transparent;
background-color: #FFFFFF;
color: #292f34
}

View file

@ -61,7 +61,7 @@ namespace Ryujinx.UI
{
if (Directory.Exists(appDir) == false)
{
Logger.PrintError(LogClass.Application, $"The \"game_dirs\" section in \"Config.json\" contains an invalid directory: \"{appDir}\"");
Logger.PrintWarning(LogClass.Application, $"The \"game_dirs\" section in \"Config.json\" contains an invalid directory: \"{appDir}\"");
continue;
}
@ -194,7 +194,7 @@ namespace Ryujinx.UI
version = "?";
applicationIcon = NspOrXciIcon(applicationPath);
Logger.PrintError(LogClass.Application, $"Your key set is missing a key with the name: {exception.Name}");
Logger.PrintWarning(LogClass.Application, $"Your key set is missing a key with the name: {exception.Name}");
}
catch (InvalidDataException)
{
@ -204,7 +204,13 @@ namespace Ryujinx.UI
version = "?";
applicationIcon = NspOrXciIcon(applicationPath);
Logger.PrintError(LogClass.Application, $"The file is not an NCA file or the header key is incorrect. Errored File: {applicationPath}");
Logger.PrintWarning(LogClass.Application, $"The file is not an NCA file or the header key is incorrect. Errored File: {applicationPath}");
}
catch (Exception exception)
{
Logger.PrintWarning(LogClass.Application, $"This warning usualy means that you have a DLC in one of you game directories\n{exception}");
continue;
}
}
else if (Path.GetExtension(applicationPath) == ".nro")

View file

@ -191,7 +191,7 @@ namespace Ryujinx.UI
}
else
{
Logger.PrintError(LogClass.Application, $"The \"custom_theme_path\" section in \"Config.json\" contains an invalid path: \"{SwitchSettings.SwitchConfig.CustomThemePath}\"");
Logger.PrintWarning(LogClass.Application, $"The \"custom_theme_path\" section in \"Config.json\" contains an invalid path: \"{SwitchSettings.SwitchConfig.CustomThemePath}\"");
}
}
else
@ -314,13 +314,19 @@ namespace Ryujinx.UI
if (File.Exists(System.IO.Path.Combine(savePath, "TimePlayed.dat")) == false)
{
Directory.CreateDirectory(savePath);
using (FileStream stream = File.OpenWrite(System.IO.Path.Combine(savePath, "TimePlayed.dat"))) { stream.Write(Encoding.ASCII.GetBytes("0")); }
using (FileStream stream = File.OpenWrite(System.IO.Path.Combine(savePath, "TimePlayed.dat")))
{
stream.Write(Encoding.ASCII.GetBytes("0"));
}
}
if (File.Exists(System.IO.Path.Combine(savePath, "LastPlayed.dat")) == false)
{
Directory.CreateDirectory(savePath);
using (FileStream stream = File.OpenWrite(System.IO.Path.Combine(savePath, "LastPlayed.dat"))) { stream.Write(Encoding.ASCII.GetBytes("Never")); }
using (FileStream stream = File.OpenWrite(System.IO.Path.Combine(savePath, "LastPlayed.dat")))
{
stream.Write(Encoding.ASCII.GetBytes("Never"));
}
}
using (FileStream stream = File.OpenWrite(System.IO.Path.Combine(savePath, "LastPlayed.dat")))
@ -333,7 +339,7 @@ namespace Ryujinx.UI
}
catch (ArgumentNullException)
{
Logger.PrintError(LogClass.Application, $"Could not access save path to retrieve time/last played data using: UserID: {_userId}, TitleID: {_device.System.TitleID}");
Logger.PrintWarning(LogClass.Application, $"Could not access save path to retrieve time/last played data using: UserID: {_userId}, TitleID: {_device.System.TitleID}");
}
}
}
@ -385,7 +391,7 @@ namespace Ryujinx.UI
}
catch (ArgumentNullException)
{
Logger.PrintError(LogClass.Application, $"Could not access save path to retrieve time/last played data using: UserID: {_userId}, TitleID: {_device.System.TitleID}");
Logger.PrintWarning(LogClass.Application, $"Could not access save path to retrieve time/last played data using: UserID: {_userId}, TitleID: {_device.System.TitleID}");
}
}

View file

@ -172,8 +172,8 @@ namespace Ryujinx.UI
_fsLogSpinAdjustment.Value = SwitchConfig.FsGlobalAccessLogMode;
_gameDirsBox.AppendColumn("", new CellRendererText(), "text", 0);
_gameDirsBoxStore = new ListStore(typeof(string));
_gameDirsBox.Model = _gameDirsBoxStore;
_gameDirsBoxStore = new ListStore(typeof(string));
_gameDirsBox.Model = _gameDirsBoxStore;
foreach (string gameDir in SwitchConfig.GameDirs)
{
_gameDirsBoxStore.AppendValues(gameDir);