From d07f6ed38e2d61dee1b690289caef97d54bd3fd6 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Mon, 29 Jul 2024 01:25:27 +0100 Subject: [PATCH] Fix hex number type ambiguity Fixes cutscenes in Super Mario Sunshine --- src/Ryujinx.Graphics.Shader/CodeGen/Msl/NumberFormatter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/NumberFormatter.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/NumberFormatter.cs index 63ecbc0aa9..8d288da3ed 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/NumberFormatter.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/NumberFormatter.cs @@ -76,7 +76,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl return value.ToString(CultureInfo.InvariantCulture); } - return "0x" + value.ToString("X", CultureInfo.InvariantCulture); + return $"as_type(0x{value.ToString("X", CultureInfo.InvariantCulture)})"; } public static string FormatUint(uint value) @@ -86,7 +86,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl return value.ToString(CultureInfo.InvariantCulture) + "u"; } - return "0x" + value.ToString("X", CultureInfo.InvariantCulture) + "u"; + return $"as_type(0x{value.ToString("X", CultureInfo.InvariantCulture)})"; } } }