fixed a bug and completed requested changes

This commit is contained in:
Xpl0itR 2019-09-02 12:32:19 +01:00
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-height: 18px;
min-width: 18px; min-width: 18px;
animation: none; animation: none;
background-color: transparent; background-color: #FFFFFF;
color: #292f34 color: #292f34
} }

View file

@ -61,7 +61,7 @@ namespace Ryujinx.UI
{ {
if (Directory.Exists(appDir) == false) 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; continue;
} }
@ -194,7 +194,7 @@ namespace Ryujinx.UI
version = "?"; version = "?";
applicationIcon = NspOrXciIcon(applicationPath); 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) catch (InvalidDataException)
{ {
@ -204,7 +204,13 @@ namespace Ryujinx.UI
version = "?"; version = "?";
applicationIcon = NspOrXciIcon(applicationPath); 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") else if (Path.GetExtension(applicationPath) == ".nro")

View file

@ -191,7 +191,7 @@ namespace Ryujinx.UI
} }
else 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 else
@ -314,13 +314,19 @@ namespace Ryujinx.UI
if (File.Exists(System.IO.Path.Combine(savePath, "TimePlayed.dat")) == false) if (File.Exists(System.IO.Path.Combine(savePath, "TimePlayed.dat")) == false)
{ {
Directory.CreateDirectory(savePath); 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) if (File.Exists(System.IO.Path.Combine(savePath, "LastPlayed.dat")) == false)
{ {
Directory.CreateDirectory(savePath); 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"))) using (FileStream stream = File.OpenWrite(System.IO.Path.Combine(savePath, "LastPlayed.dat")))
@ -333,7 +339,7 @@ namespace Ryujinx.UI
} }
catch (ArgumentNullException) 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) 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}");
} }
} }