Forráskód Böngészése

Merge pull request #2396 from Subv/sema_acquire

Kernel/Semaphore: Fixed a regression in semaphore waits.
bunnei 9 éve
szülő
commit
59f4f1d7ff
1 módosított fájl, 2 hozzáadás és 1 törlés
  1. 2 1
      src/core/hle/kernel/semaphore.cpp

+ 2 - 1
src/core/hle/kernel/semaphore.cpp

@@ -35,7 +35,8 @@ bool Semaphore::ShouldWait(Thread* thread) const {
 }
 
 void Semaphore::Acquire(Thread* thread) {
-    ASSERT_MSG(!ShouldWait(thread), "object unavailable!");
+    if (available_count <= 0)
+        return;
     --available_count;
 }