forked from suyu/suyu
lcd: added thread wait after (faked) vblank interrupt (would have) occurred
This commit is contained in:
parent
b99ac2c3d6
commit
7bb66421a0
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue