Merge branch 'master' into 'master'

Fixed macOS random freezing at character selection screen of Super Mario Party Jamboree

See merge request [ryubing/ryujinx!239](https://git.ryujinx.app/ryubing/ryujinx/-/merge_requests/239)
This commit is contained in:
BXYMartin 2026-01-03 11:55:24 -06:00
commit 3b408f2f62

View file

@ -145,29 +145,19 @@ namespace Ryujinx.Graphics.Vulkan.Queries
{
long data = _defaultValue;
if (wakeSignal == null)
int iterations = 0;
while (WaitingForValue(data) && iterations++ < MaxQueryRetries)
{
while (WaitingForValue(data))
data = Marshal.ReadInt64(_bufferMap);
if (wakeSignal != null && WaitingForValue(data))
{
data = Marshal.ReadInt64(_bufferMap);
wakeSignal.WaitOne(0);
}
}
else
{
int iterations = 0;
while (WaitingForValue(data) && iterations++ < MaxQueryRetries)
{
data = Marshal.ReadInt64(_bufferMap);
if (WaitingForValue(data))
{
wakeSignal.WaitOne(1);
}
}
if (iterations >= MaxQueryRetries)
{
Logger.Error?.Print(LogClass.Gpu, $"Error: Query result {_type} timed out. Took more than {MaxQueryRetries} tries.");
}
if (iterations >= MaxQueryRetries)
{
Logger.Error?.Print(LogClass.Gpu, $"Error: Query result {_type} timed out. Took more than {MaxQueryRetries} tries.");
}
return data;