diff options
author | bunnei <bunneidev@gmail.com> | 2014-05-26 20:52:00 -0400 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-05-26 20:52:00 -0400 |
commit | 6448c2f30062c085330ff26a4812c9a91c7b492c (patch) | |
tree | 386e32cf3ec053491fb8dfd8459a1c92553241d9 /src/core/hw/lcd.cpp | |
parent | 74f972651566bdd1266115fc9dd9a1b652f8dbec (diff) | |
parent | 0aa582bf89c3e3e479540b706511590636870912 (diff) |
Merge pull request #9 from bunnei/master
Add initial kernel HLE, includes thread creation and context switching
Diffstat (limited to 'src/core/hw/lcd.cpp')
-rw-r--r-- | src/core/hw/lcd.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hw/lcd.cpp b/src/core/hw/lcd.cpp index 6468053f2..b57563a73 100644 --- a/src/core/hw/lcd.cpp +++ b/src/core/hw/lcd.cpp @@ -11,6 +11,8 @@ #include "video_core/video_core.h" +#include "core/hle/kernel/thread.h" + namespace LCD { Registers g_regs; @@ -130,9 +132,11 @@ template void Write<u8>(u32 addr, const u8 data); void Update() { u64 current_ticks = Core::g_app_core->GetTicks(); + // Fake a vertical blank if ((current_ticks - g_last_ticks) >= kFrameTicks) { g_last_ticks = current_ticks; VideoCore::g_renderer->SwapBuffers(); + Kernel::WaitCurrentThread(WAITTYPE_VBLANK); } } |