Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
6575952432 | |||
9a28ba72b1 | |||
34a9922b57 |
8
distribution/macos/shortcut-launch-script.sh
Normal file
8
distribution/macos/shortcut-launch-script.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
launch_arch="$(uname -m)"
|
||||||
|
if [ "$(sysctl -in sysctl.proc_translated)" = "1" ]
|
||||||
|
then
|
||||||
|
launch_arch="arm64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
arch -$launch_arch {0} {1}
|
@ -67,9 +67,18 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
|||||||
lock (_queryPool)
|
lock (_queryPool)
|
||||||
{
|
{
|
||||||
count = Math.Min(count, _queryPool.Count);
|
count = Math.Min(count, _queryPool.Count);
|
||||||
for (int i = 0; i < count; i++)
|
|
||||||
|
if (count > 0)
|
||||||
{
|
{
|
||||||
_queryPool.ElementAt(i).PoolReset(cmd, ResetSequence);
|
foreach (BufferedQuery query in _queryPool)
|
||||||
|
{
|
||||||
|
query.PoolReset(cmd, ResetSequence);
|
||||||
|
|
||||||
|
if (--count == 0)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,12 @@ namespace Ryujinx.HLE.FileSystem
|
|||||||
|
|
||||||
public void InitializeFsServer(LibHac.Horizon horizon, out HorizonClient fsServerClient)
|
public void InitializeFsServer(LibHac.Horizon horizon, out HorizonClient fsServerClient)
|
||||||
{
|
{
|
||||||
LocalFileSystem serverBaseFs = new(AppDataManager.BaseDirPath);
|
LocalFileSystem serverBaseFs = new(useUnixTimeStamps: true);
|
||||||
|
Result result = serverBaseFs.Initialize(AppDataManager.BaseDirPath, LocalFileSystem.PathMode.DefaultCaseSensitivity, ensurePathExists: true);
|
||||||
|
if (result.IsFailure())
|
||||||
|
{
|
||||||
|
throw new HorizonResultException(result, "Error creating LocalFileSystem.");
|
||||||
|
}
|
||||||
|
|
||||||
fsServerClient = horizon.CreatePrivilegedHorizonClient();
|
fsServerClient = horizon.CreatePrivilegedHorizonClient();
|
||||||
var fsServer = new FileSystemServer(fsServerClient);
|
var fsServer = new FileSystemServer(fsServerClient);
|
||||||
|
@ -54,6 +54,7 @@ namespace Ryujinx.Ui.Common.Helper
|
|||||||
{
|
{
|
||||||
string basePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Ryujinx");
|
string basePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Ryujinx");
|
||||||
var plistFile = EmbeddedResources.ReadAllText("Ryujinx.Ui.Common/shortcut-template.plist");
|
var plistFile = EmbeddedResources.ReadAllText("Ryujinx.Ui.Common/shortcut-template.plist");
|
||||||
|
var shortcutScript = EmbeddedResources.ReadAllText("Ryujinx.Ui.Common/shortcut-launch-script.sh");
|
||||||
// Macos .App folder
|
// Macos .App folder
|
||||||
string contentFolderPath = Path.Combine("/Applications", cleanedAppName + ".app", "Contents");
|
string contentFolderPath = Path.Combine("/Applications", cleanedAppName + ".app", "Contents");
|
||||||
string scriptFolderPath = Path.Combine(contentFolderPath, "MacOS");
|
string scriptFolderPath = Path.Combine(contentFolderPath, "MacOS");
|
||||||
@ -68,8 +69,7 @@ namespace Ryujinx.Ui.Common.Helper
|
|||||||
string scriptPath = Path.Combine(scriptFolderPath, ScriptName);
|
string scriptPath = Path.Combine(scriptFolderPath, ScriptName);
|
||||||
using StreamWriter scriptFile = new(scriptPath);
|
using StreamWriter scriptFile = new(scriptPath);
|
||||||
|
|
||||||
scriptFile.WriteLine("#!/bin/sh");
|
scriptFile.Write(shortcutScript, basePath, GetArgsString(appFilePath));
|
||||||
scriptFile.WriteLine($"{basePath} {GetArgsString(appFilePath)}");
|
|
||||||
|
|
||||||
// Set execute permission
|
// Set execute permission
|
||||||
FileInfo fileInfo = new(scriptPath);
|
FileInfo fileInfo = new(scriptPath);
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
|
|
||||||
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'osx-x64' OR '$(RuntimeIdentifier)' == 'osx-arm64' OR '$(RuntimeIdentifier)' == ''">
|
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'osx-x64' OR '$(RuntimeIdentifier)' == 'osx-arm64' OR '$(RuntimeIdentifier)' == ''">
|
||||||
<EmbeddedResource Include="..\..\distribution\macos\shortcut-template.plist" />
|
<EmbeddedResource Include="..\..\distribution\macos\shortcut-template.plist" />
|
||||||
|
<EmbeddedResource Include="..\..\distribution\macos\shortcut-launch-script.sh" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
Reference in New Issue
Block a user