mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-01 14:21:41 +00:00
LIBRETRO: move timer handler calls
This commit is contained in:
parent
be013f27e9
commit
6be7019fb0
@ -651,7 +651,7 @@ public:
|
||||
virtual bool pollEvent(Common::Event &event) {
|
||||
_threadSwitchCaller = THREAD_SWITCH_POLL;
|
||||
((LibretroTimerManager *)_timerManager)->checkThread();
|
||||
|
||||
((LibretroTimerManager *)_timerManager)->handler();
|
||||
if (!_events.empty()) {
|
||||
event = _events.front();
|
||||
_events.pop_front();
|
||||
@ -699,6 +699,7 @@ public:
|
||||
elapsed_time = getMillis() - start_time;
|
||||
time_remaining = time_remaining > elapsed_time ? time_remaining - elapsed_time : 0;
|
||||
}
|
||||
((LibretroTimerManager *)_timerManager)->handler();
|
||||
}
|
||||
|
||||
virtual Common::MutexInternal *createMutex(void) {
|
||||
|
@ -41,10 +41,8 @@ void LibretroTimerManager::switchThread(void) {
|
||||
}
|
||||
|
||||
void LibretroTimerManager::checkThread(void) {
|
||||
if (g_system->getMillis() >= _nextSwitchTime) {
|
||||
if (g_system->getMillis() >= _nextSwitchTime)
|
||||
switchThread();
|
||||
handler();
|
||||
}
|
||||
}
|
||||
|
||||
uint32 LibretroTimerManager::timeToNextSwitch(void) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user