mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-04-21 14:12:04 +00:00
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:
commit
45f06b30c3
1 changed files with 8 additions and 18 deletions
|
|
@ -145,29 +145,19 @@ namespace Ryujinx.Graphics.Vulkan.Queries
|
||||||
{
|
{
|
||||||
long data = _defaultValue;
|
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)
|
if (iterations >= MaxQueryRetries)
|
||||||
{
|
{
|
||||||
Logger.Error?.Print(LogClass.Gpu, $"Error: Query result {_type} timed out. Took more than {MaxQueryRetries} tries.");
|
Logger.Error?.Print(LogClass.Gpu, $"Error: Query result {_type} timed out. Took more than {MaxQueryRetries} tries.");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue