Explorar o código

lcd: added thread wait after (faked) vblank interrupt (would have) occurred

bunnei %!s(int64=12) %!d(string=hai) anos
pai
achega
7bb66421a0
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/core/hw/lcd.cpp

+ 4 - 0
src/core/hw/lcd.cpp

@@ -11,6 +11,8 @@
 
 
 #include "video_core/video_core.h"
 #include "video_core/video_core.h"
 
 
+#include "core/hle/kernel/thread.h"
+
 namespace LCD {
 namespace LCD {
 
 
 Registers g_regs;
 Registers g_regs;
@@ -130,9 +132,11 @@ template void Write<u8>(u32 addr, const u8 data);
 void Update() {
 void Update() {
     u64 current_ticks = Core::g_app_core->GetTicks();
     u64 current_ticks = Core::g_app_core->GetTicks();
 
 
+    // Fake a vertical blank
     if ((current_ticks - g_last_ticks) >= kFrameTicks) {
     if ((current_ticks - g_last_ticks) >= kFrameTicks) {
         g_last_ticks = current_ticks;
         g_last_ticks = current_ticks;
         VideoCore::g_renderer->SwapBuffers();
         VideoCore::g_renderer->SwapBuffers();
+        Kernel::WaitCurrentThread(WAITTYPE_VBLANK);
     }
     }
 }
 }