Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ee7e229082 | |||
| 3b2a0f7ff6 | |||
| d1824c5cb6 | |||
| 0502da96cd | |||
| 7df0fb587e | |||
| 50847f0687 | |||
| 125f6d2777 | |||
| dfc4831828 | |||
| 45feeae9db | |||
| e67df5219c |
@@ -41,13 +41,12 @@ jobs:
|
|||||||
let hidden_headless_artifacts = `\n\n <details><summary>GUI-less</summary>\n`;
|
let hidden_headless_artifacts = `\n\n <details><summary>GUI-less</summary>\n`;
|
||||||
let hidden_debug_artifacts = `\n\n <details><summary>Only for Developers</summary>\n`;
|
let hidden_debug_artifacts = `\n\n <details><summary>Only for Developers</summary>\n`;
|
||||||
for (const art of artifacts) {
|
for (const art of artifacts) {
|
||||||
var url = `https://github.com/Ryubing/Ryujinx/actions/runs/${run_id}/artifacts/${art_id}`;
|
|
||||||
if(art.name.includes('Debug')) {
|
if(art.name.includes('Debug')) {
|
||||||
hidden_debug_artifacts += `\n* [${art.name}](${url})`;
|
hidden_debug_artifacts += `\n* [${art.name}](https://nightly.link/${owner}/${repo}/actions/artifacts/${art.id}.zip)`;
|
||||||
} else if(art.name.includes('nogui-ryujinx')) {
|
} else if(art.name.includes('nogui-ryujinx')) {
|
||||||
hidden_headless_artifacts += `\n* [${art.name}](${url})`;
|
hidden_headless_artifacts += `\n* [${art.name}](https://nightly.link/${owner}/${repo}/actions/artifacts/${art.id}.zip)`;
|
||||||
} else {
|
} else {
|
||||||
body += `\n* [${art.name}](${url})`;
|
body += `\n* [${art.name}](https://nightly.link/${owner}/${repo}/actions/artifacts/${art.id}.zip)`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hidden_headless_artifacts += `\n</details>`;
|
hidden_headless_artifacts += `\n</details>`;
|
||||||
|
|||||||
@@ -1,23 +1,19 @@
|
|||||||
using SharpMetal.Foundation;
|
using SharpMetal.Foundation;
|
||||||
using SharpMetal.ObjectiveCCore;
|
using SharpMetal.ObjectiveCCore;
|
||||||
using System.Runtime.Versioning;
|
using System.Runtime.Versioning;
|
||||||
// ReSharper disable InconsistentNaming
|
|
||||||
|
|
||||||
namespace Ryujinx.Graphics.Metal.SharpMetalExtensions
|
namespace Ryujinx.Graphics.Metal.SharpMetalExtensions
|
||||||
{
|
{
|
||||||
[SupportedOSPlatform("macOS")]
|
[SupportedOSPlatform("macOS")]
|
||||||
public static class NSHelper
|
public static class NSHelper
|
||||||
{
|
{
|
||||||
private static readonly Selector sel_getCStringMaxLengthEncoding = "getCString:maxLength:encoding:";
|
|
||||||
private static readonly Selector sel_stringWithUTF8String = "stringWithUTF8String:";
|
|
||||||
|
|
||||||
public static unsafe string ToDotNetString(this NSString source)
|
public static unsafe string ToDotNetString(this NSString source)
|
||||||
{
|
{
|
||||||
char[] sourceBuffer = new char[source.Length];
|
char[] sourceBuffer = new char[source.Length];
|
||||||
fixed (char* pSourceBuffer = sourceBuffer)
|
fixed (char* pSourceBuffer = sourceBuffer)
|
||||||
{
|
{
|
||||||
ObjectiveC.bool_objc_msgSend(source,
|
ObjectiveC.bool_objc_msgSend(source,
|
||||||
sel_getCStringMaxLengthEncoding,
|
"getCString:maxLength:encoding:",
|
||||||
pSourceBuffer,
|
pSourceBuffer,
|
||||||
source.MaximumLengthOfBytes(NSStringEncoding.UTF16) + 1,
|
source.MaximumLengthOfBytes(NSStringEncoding.UTF16) + 1,
|
||||||
(ulong)NSStringEncoding.UTF16);
|
(ulong)NSStringEncoding.UTF16);
|
||||||
@@ -27,6 +23,6 @@ namespace Ryujinx.Graphics.Metal.SharpMetalExtensions
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static NSString ToNSString(this string source)
|
public static NSString ToNSString(this string source)
|
||||||
=> new(ObjectiveC.IntPtr_objc_msgSend(new ObjectiveCClass(nameof(NSString)), sel_stringWithUTF8String, source));
|
=> new(ObjectiveC.IntPtr_objc_msgSend(new ObjectiveCClass("NSString"), "stringWithUTF8String:", source));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user