Skip to content

Commit

Permalink
Add ability to trim XCI files from the application context menu (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
amurgshere authored Oct 22, 2024
1 parent 7e9a293 commit 6253fe1
Show file tree
Hide file tree
Showing 15 changed files with 915 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Ryujinx.Common/Logging/LogClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,6 @@ public enum LogClass
TamperMachine,
UI,
Vic,
XCIFileTrimmer
}
}
30 changes: 30 additions & 0 deletions src/Ryujinx.Common/Logging/XCIFileTrimmerLog.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Ryujinx.Common.Utilities;

namespace Ryujinx.Common.Logging
{
public class XCIFileTrimmerLog : XCIFileTrimmer.ILog
{
public virtual void Progress(long current, long total, string text, bool complete)
{
}

public void Write(XCIFileTrimmer.LogType logType, string text)
{
switch (logType)
{
case XCIFileTrimmer.LogType.Info:
Logger.Notice.Print(LogClass.XCIFileTrimmer, text);
break;
case XCIFileTrimmer.LogType.Warn:
Logger.Warning?.Print(LogClass.XCIFileTrimmer, text);
break;
case XCIFileTrimmer.LogType.Error:
Logger.Error?.Print(LogClass.XCIFileTrimmer, text);
break;
case XCIFileTrimmer.LogType.Progress:
Logger.Info?.Print(LogClass.XCIFileTrimmer, text);
break;
}
}
}
}
Loading

0 comments on commit 6253fe1

Please sign in to comment.