Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions src/Bot/Services/LogAnalysis/AnalysisResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ public LogAnalysis(string rawLogText, LogAnalysisService service)
}

public string RawLogContent { get; }
public List<string[]> LogErrors;
public List<string> Errors;
public List<string> Notes;
// Fatal errors are errors that prevent the log from being scanned
public List<string> FatalErrors;

public HardwareInfo Hardware;
public EmulatorInfo Emulator;
public GameInfo Game;
Expand All @@ -23,20 +27,24 @@ public class HardwareInfo
public string Cpu { get; set; }
public string Gpu { get; set; }
public string Ram { get; set; }
public string RamAvailable { get; set; }
public string Os { get; set; }
}

public class EmulatorInfo
{
public (RyujinxVersion VersionType, string VersionString) Version { get; set; }
public string Firmware { get; set; }
public List<string> EnabledLogs { get; set; } = [];
public string EnabledLogs { get; set; }
public string Timestamp { get; set; }
}

public class GameInfo
{
public string Name { get; set; }
public string Errors { get; set; }
public string AppId { get; set; }
public string AppIdBids { get; set; }
public string BuildIDs { get; set; }
public string Mods { get; set; }
public string Cheats { get; set; }
}
Expand All @@ -54,9 +62,11 @@ public class Settings
public bool Pptc { get; set; }
public bool ShaderCache { get; set; }
public string VSyncMode { get; set; }
public bool? Hypervisor { get; set; }
public string Hypervisor { get; set; }
public string ResScale { get; set; }
public string AnisotropicFiltering { get; set; }
public string AspectRatio { get; set; }
public bool TextureRecompression { get; set; }
public bool CustomVSyncInterval { get; set; }
public string MultiplayerMode { get; set; }
}
79 changes: 79 additions & 0 deletions src/Bot/Services/LogAnalysis/Notes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
namespace RyuBot.Services;

public class Notes
{
public readonly string AMDOpenGL = "⚠️ **AMD GPU users should consider using Vulkan graphics backend**";
public readonly string IntelOpenGL = "⚠️ **Intel GPU users should consider using Vulkan graphics backend**";
public readonly string IntelMac = "⚠️ **Intel Macs are not supported.**";
public readonly string Rosetta = "🔴 **Rosetta should be disabled**";
public readonly string DebugLogs = "⚠️ **Debug logs enabled will have a negative impact on performance**";

public readonly string MissingLogs = "⚠️ **Logs settings are not default. Consider enabled `Info`, " +
"`Warning`, `Error` and `Guest` logs.**";

public readonly string DummyAudio = "⚠️ Dummy audio backend, consider changing to SDL2.";
public readonly string Pptc = "🔴 **PPTC cache should be enabled**";
public readonly string ShaderCache = "🔴 **Shader cache should be enabled.**";

public readonly string SoftwareMemory = "🔴 **`Software` setting in Memory Manager Mode will give slower " +
"performance than the default setting of `Host unchecked`.**";

public readonly string MissingServices = "⚠️ `Ignore Missing Services` being enabled can cause instability.";

public readonly string FsIntegrity =
"⚠️ Disabling file integrity checks may cause corrupted dumps to not be detected.";

public readonly string VSync = "⚠️ V-Sync disabled can cause instability like games running faster than " +
"intended or longer load times.";

public readonly string HashError = "🔴 Dump error detected. Investigate possible bad game/firmware dump issues.";
public readonly string GameCrashed = "🔴 The game itself crashed, not Ryujinx.";
public readonly string MissingKeys = "⚠️ Keys or firmware out of date, consider updating them.";

public readonly string PermissionError = "🔴 File permission error. Consider deleting save directory and " +
"allowing Ryujinx to make a new one.";

public readonly string FsTargetError = "🔴 Save not found error. Consider starting game without a save file or " +
"using a new save file.";

public readonly string ServiceError = "⚠️ Consider enabling `Ignore Missing Services` in Ryujinx settings.";
public readonly string VramError = "⚠️ Consider enabling `Texture Recompression` in Ryujinx settings.";
public readonly string DefaultProfile = "⚠️ Default user profile in use, consider creating a custom one.";
public readonly string SaveDataIndex = "🔴 **Save data index for the game may be corrupted.**";
public readonly string DramSize = "⚠️ `DRAM size` should only be increased for 4K mods.";
public readonly string BackendThreadingAuto = "🔴 **Graphics Backend Multithreading should be set to `Auto`.**";

public readonly string CustomRefreshRate = "⚠️ Custom Refresh Rate is experimental, it should only be " +
"enabled in specific cases.";

public readonly string Firmware =
"❌ **Nintendo Switch firmware not found**, consider adding your keys and firmware.";

public readonly string Metal = "⚠️ **The Metal backend is experimental. " +
"If you're experiencing issues, switch to Vulkan or Auto.**";

public readonly string ShaderCacheCollision =
"⚠️ Cache collision detected. Investigate possible shader cache issues.";

public readonly string ShaderCacheCorruption =
"⚠️ Cache corruption detected. Investigate possible shader cache issues.";
}

public class FatalErrors
{
public readonly string Custom = "⚠️ **Custom builds are not officially supported**";

public readonly string OriginalLdn =
"**The old Ryujinx LDN build no longer works. Please update to " +
"[this version](<https://github.com/GreemDev/Ryujinx/releases/latest>). *Yes, it has LDN functionality.***";

public readonly string Original =
"**⚠️ It seems you're still using the original Ryujinx. " +
"Please update to [this version](<https://github.com/GreemDev/Ryujinx/releases/latest>)," +
" as that's what this Discord server is for.**";

public readonly string Mirror =
"**It seems you're using the other Ryujinx fork, ryujinx-mirror. " +
"Please update to [this version](<https://github.com/GreemDev/Ryujinx/releases/latest>), " +
"as that's what this Discord server is for; or go to their Discord server for support.**";
}
4 changes: 4 additions & 0 deletions src/Bot/Services/LogAnalysis/Regexes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public static partial class LogAnalysisPatterns
public static readonly Regex OriginalProjectVersion = OriginalProjectVersionRegex();
public static readonly Regex OriginalProjectLdnVersion = OriginalProjectLdnVersionRegex();
public static readonly Regex PrVersion = PrVersionRegex();
public static readonly Regex OriginalPrVersion = OriginalPrVersionRegex();
public static readonly Regex MirrorVersion = MirrorVersionRegex();

[GeneratedRegex(@"^1\.2\.\d+$")]
Expand All @@ -26,6 +27,9 @@ public static partial class LogAnalysisPatterns
[GeneratedRegex(@"^1\.2\.\d\+([a-f]|\d){7}$")]
private static partial Regex PrVersionRegex();

[GeneratedRegex(@"^1\.1\.\d\+([a-f]|\d){7}$")]
private static partial Regex OriginalPrVersionRegex();

[GeneratedRegex(@"^r\.(\d|\w){7}$")]
private static partial Regex MirrorVersionRegex();
}
Loading