mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-01-11 20:10:30 +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
3b408f2f62
1 changed files with 8 additions and 18 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue