mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-28 09:27:10 +02:00
bunch of stuff don't push this monstrosity anywhere
actual stuff don't push this monstrosity anywhere
This commit is contained in:
parent
259f5da0fb
commit
59d6ceb9ee
31 changed files with 513 additions and 77 deletions
|
@ -50,6 +50,10 @@ namespace Ryujinx.Common.Configuration
|
|||
{
|
||||
appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Application Support");
|
||||
}
|
||||
else if (OperatingSystem.IsIOS())
|
||||
{
|
||||
appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
}
|
||||
else
|
||||
{
|
||||
appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
|
|
|
@ -30,15 +30,26 @@ namespace Ryujinx.Common.Logging.Targets
|
|||
|
||||
public void Log(object sender, LogEventArgs args)
|
||||
{
|
||||
Console.ForegroundColor = GetLogColor(args.Level);
|
||||
Console.WriteLine(_formatter.Format(args));
|
||||
Console.ResetColor();
|
||||
if (OperatingSystem.IsIOS())
|
||||
{
|
||||
Console.WriteLine(_formatter.Format(args));
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.ForegroundColor = GetLogColor(args.Level);
|
||||
Console.WriteLine(_formatter.Format(args));
|
||||
Console.ResetColor();
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
GC.SuppressFinalize(this);
|
||||
Console.ResetColor();
|
||||
|
||||
if (!OperatingSystem.IsIOS())
|
||||
{
|
||||
Console.ResetColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,11 @@ namespace Ryujinx.Common
|
|||
|
||||
public static string GetVersion()
|
||||
{
|
||||
if (OperatingSystem.IsIOS())
|
||||
{
|
||||
return "ios";
|
||||
}
|
||||
|
||||
if (IsValid())
|
||||
{
|
||||
return BuildVersion;
|
||||
|
@ -46,7 +51,7 @@ namespace Ryujinx.Common
|
|||
#else
|
||||
public static string GetBaseApplicationDirectory()
|
||||
{
|
||||
if (IsFlatHubBuild() || OperatingSystem.IsMacOS())
|
||||
if (IsFlatHubBuild() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS())
|
||||
{
|
||||
return AppDataManager.BaseDirPath;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Ryujinx.Common.SystemInterop
|
|||
|
||||
public StdErrAdapter()
|
||||
{
|
||||
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS())
|
||||
if (OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()) // TODO: iOS?
|
||||
{
|
||||
RegisterPosix();
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ namespace Ryujinx.Common.SystemInterop
|
|||
|
||||
[SupportedOSPlatform("linux")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
[SupportedOSPlatform("ios")]
|
||||
private void RegisterPosix()
|
||||
{
|
||||
const int StdErrFileno = 2;
|
||||
|
@ -44,6 +45,7 @@ namespace Ryujinx.Common.SystemInterop
|
|||
|
||||
[SupportedOSPlatform("linux")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
[SupportedOSPlatform("ios")]
|
||||
private async Task EventWorkerAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
using TextReader reader = new StreamReader(_pipeReader, leaveOpen: true);
|
||||
|
@ -92,6 +94,7 @@ namespace Ryujinx.Common.SystemInterop
|
|||
|
||||
[SupportedOSPlatform("linux")]
|
||||
[SupportedOSPlatform("macos")]
|
||||
[SupportedOSPlatform("ios")]
|
||||
private static Stream CreateFileDescriptorStream(int fd)
|
||||
{
|
||||
return new FileStream(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue