[HLE/Kernel] Somewhat improved sync primitives
This commit is contained in:
parent
e9a96e3522
commit
b9af34f3dd
20 changed files with 408 additions and 443 deletions
|
@ -22,7 +22,7 @@ namespace Ryujinx.Core.OsHle
|
|||
|
||||
public void SetFocus(bool IsFocused)
|
||||
{
|
||||
FocusState = IsFocused
|
||||
FocusState = IsFocused
|
||||
? FocusState.InFocus
|
||||
: FocusState.OutOfFocus;
|
||||
|
||||
|
@ -33,14 +33,14 @@ namespace Ryujinx.Core.OsHle
|
|||
{
|
||||
Messages.Enqueue(Message);
|
||||
|
||||
MessageEvent.Handle.Set();
|
||||
MessageEvent.WaitEvent.Set();
|
||||
}
|
||||
|
||||
public bool TryDequeueMessage(out MessageInfo Message)
|
||||
{
|
||||
if (Messages.Count < 2)
|
||||
{
|
||||
MessageEvent.Handle.Reset();
|
||||
MessageEvent.WaitEvent.Reset();
|
||||
}
|
||||
|
||||
return Messages.TryDequeue(out Message);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue