Merge branch 'rr1-maint'
Conflicts: src/lua/lua.cpp
This commit is contained in:
commit
985e4c6327
2 changed files with 4 additions and 1 deletions
|
@ -10,6 +10,7 @@ struct lua_unsaferewind
|
||||||
uint64_t secs;
|
uint64_t secs;
|
||||||
uint64_t ssecs;
|
uint64_t ssecs;
|
||||||
std::vector<uint32_t> pollcounters;
|
std::vector<uint32_t> pollcounters;
|
||||||
|
std::vector<char> hostmemory;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -429,6 +429,7 @@ void lua_callback_do_unsafe_rewind(const std::vector<char>& save, uint64_t secs,
|
||||||
run_callback("on_pre_rewind");
|
run_callback("on_pre_rewind");
|
||||||
mainloop_restore_state(u2->state, u2->secs, u2->ssecs);
|
mainloop_restore_state(u2->state, u2->secs, u2->ssecs);
|
||||||
mov.fast_load(u2->frame, u2->ptr, u2->lag, u2->pollcounters);
|
mov.fast_load(u2->frame, u2->ptr, u2->lag, u2->pollcounters);
|
||||||
|
try { get_host_memory() = u2->hostmemory; } catch(...) {}
|
||||||
run_callback("on_post_rewind");
|
run_callback("on_post_rewind");
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
return;
|
return;
|
||||||
|
@ -440,6 +441,7 @@ void lua_callback_do_unsafe_rewind(const std::vector<char>& save, uint64_t secs,
|
||||||
u2->state = save;
|
u2->state = save;
|
||||||
u2->secs = secs,
|
u2->secs = secs,
|
||||||
u2->ssecs = ssecs;
|
u2->ssecs = ssecs;
|
||||||
|
u2->hostmemory = get_host_memory();
|
||||||
mov.fast_save(u2->frame, u2->ptr, u2->lag, u2->pollcounters);
|
mov.fast_save(u2->frame, u2->ptr, u2->lag, u2->pollcounters);
|
||||||
return 1;
|
return 1;
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Add table
Reference in a new issue