mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 22:25:41 +12:00
[Kernel] Add evalReschedule function
This commit is contained in:
parent
60de6a65f5
commit
3d5f1ea517
3 changed files with 10 additions and 4 deletions
|
@ -172,6 +172,13 @@ public:
|
|||
|
||||
void requireReschedule() { needReschedule = true; }
|
||||
|
||||
void evalReschedule() {
|
||||
if (needReschedule) {
|
||||
needReschedule = false;
|
||||
rescheduleThreads();
|
||||
}
|
||||
}
|
||||
|
||||
Handle makeObject(KernelObjectType type) {
|
||||
if (handleCounter > KernelHandles::Max) [[unlikely]] {
|
||||
Helpers::panic("Hlep we somehow created enough kernel objects to overflow this thing");
|
||||
|
|
|
@ -62,10 +62,7 @@ void Kernel::serviceSVC(u32 svc) {
|
|||
default: Helpers::panic("Unimplemented svc: %X @ %08X", svc, regs[15]); break;
|
||||
}
|
||||
|
||||
if (needReschedule) {
|
||||
needReschedule = false;
|
||||
rescheduleThreads();
|
||||
}
|
||||
evalReschedule();
|
||||
}
|
||||
|
||||
void Kernel::setVersion(u8 major, u8 minor) {
|
||||
|
|
|
@ -357,6 +357,8 @@ void Emulator::run() {
|
|||
|
||||
hid.updateInputs(cpu.getTicks());
|
||||
}
|
||||
// TODO: Should this be uncommented?
|
||||
// kernel.evalReschedule();
|
||||
|
||||
// Update inputs in the HID module
|
||||
SDL_GL_SwapWindow(window);
|
||||
|
|
Loading…
Add table
Reference in a new issue