forked from MeloNX/MeloNX
fix native file logs
This commit is contained in:
parent
6262bd1730
commit
4eb8e27517
@ -10,7 +10,7 @@ namespace LibRyujinx.Sample
|
|||||||
{
|
{
|
||||||
internal static class LibRyujinxInterop
|
internal static class LibRyujinxInterop
|
||||||
{
|
{
|
||||||
private const string dll = "LibRyujinx.Shared.dll";
|
private const string dll = "LibRyujinx.dll";
|
||||||
|
|
||||||
[DllImport(dll, EntryPoint = "initialize")]
|
[DllImport(dll, EntryPoint = "initialize")]
|
||||||
public extern static bool Initialize(IntPtr path);
|
public extern static bool Initialize(IntPtr path);
|
||||||
|
@ -83,7 +83,7 @@ namespace LibRyujinx
|
|||||||
Logger.SetEnable(LogLevel.AccessLog, false);
|
Logger.SetEnable(LogLevel.AccessLog, false);
|
||||||
|
|
||||||
Logger.AddTarget(new AsyncLogTargetWrapper(
|
Logger.AddTarget(new AsyncLogTargetWrapper(
|
||||||
new FileLogTarget(basePath, "file"),
|
new FileLogTarget(AppDataManager.BaseDirPath, "file"),
|
||||||
1000,
|
1000,
|
||||||
AsyncLogTargetOverflowAction.Block
|
AsyncLogTargetOverflowAction.Block
|
||||||
));
|
));
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LinkerFlavor>lld</LinkerFlavor>
|
<LinkerFlavor Condition="'$(RuntimeIdentifier)'=='linux-bionic-arm64'">lld</LinkerFlavor>
|
||||||
|
<DefineConstants>$(DefineConstants);FORCE_EXTERNAL_BASE_DIR</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PublishAot>true</PublishAot>
|
<PublishAot>true</PublishAot>
|
||||||
@ -32,7 +33,7 @@
|
|||||||
<PackageReference Include="Rxmxnx.PInvoke.Extensions"/>
|
<PackageReference Include="Rxmxnx.PInvoke.Extensions"/>
|
||||||
<PackageReference Include="Silk.NET.Vulkan" />
|
<PackageReference Include="Silk.NET.Vulkan" />
|
||||||
<PackageReference Include="Silk.NET.Vulkan.Extensions.KHR" />
|
<PackageReference Include="Silk.NET.Vulkan.Extensions.KHR" />
|
||||||
<LinkerArg Include="-llog" />
|
<LinkerArg Condition="'$(RuntimeIdentifier)'=='linux-bionic-arm64'" Include="-llog" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Jni\" />
|
<Folder Include="Jni\" />
|
||||||
|
@ -35,7 +35,20 @@ namespace Ryujinx.Common
|
|||||||
return BuildVersion;
|
return BuildVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
|
if (SystemInfo.SystemInfo.IsBionic)
|
||||||
|
{
|
||||||
|
return "Android_1.0";
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
|
||||||
|
}
|
||||||
|
catch (Exception _)
|
||||||
|
{
|
||||||
|
return "Native";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FORCE_EXTERNAL_BASE_DIR
|
#if FORCE_EXTERNAL_BASE_DIR
|
||||||
@ -46,7 +59,7 @@ namespace Ryujinx.Common
|
|||||||
#else
|
#else
|
||||||
public static string GetBaseApplicationDirectory()
|
public static string GetBaseApplicationDirectory()
|
||||||
{
|
{
|
||||||
if (IsFlatHubBuild() || OperatingSystem.IsMacOS())
|
if (IsFlatHubBuild() || OperatingSystem.IsMacOS() || SystemInfo.SystemInfo.IsBionic)
|
||||||
{
|
{
|
||||||
return AppDataManager.BaseDirPath;
|
return AppDataManager.BaseDirPath;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user