SCI: Stop EngineState::wait mutating r_acc
This wait function is used by kernel calls other than kWait, and those other functions do not mutate r_acc in SSCI.
This commit is contained in:
parent
0a44b54ee2
commit
2f9967524f
3 changed files with 6 additions and 5 deletions
|
@ -136,13 +136,14 @@ void EngineState::speedThrottler(uint32 neededSleep) {
|
|||
}
|
||||
}
|
||||
|
||||
void EngineState::wait(int16 ticks) {
|
||||
int EngineState::wait(int16 ticks) {
|
||||
uint32 time = g_system->getMillis();
|
||||
r_acc = make_reg(0, ((long)time - (long)lastWaitTime) * 60 / 1000);
|
||||
const int tickDelta = ((long)time - (long)lastWaitTime) * 60 / 1000;
|
||||
lastWaitTime = time;
|
||||
|
||||
ticks *= g_debug_sleeptime_factor;
|
||||
g_sci->sleep(ticks * 1000 / 60);
|
||||
return tickDelta;
|
||||
}
|
||||
|
||||
void EngineState::initGlobals() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue