-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
The is_paused variable in the update() method of ui_functions seems to be ignored.
I tried to add bool is_paused to the replay_state struct in the hope of being able to toggle it from update() and use it to from replay_functions::next_frame() to just skip frames but with no luck :/
In ui.h:
void update() {
…
if (e.sym == SDLK_SPACE || e.sym == SDLK_p) {
is_paused = !is_paused;
replay_st.is_paused = !replay_st.is_paused;
…
}In replay.h:
struct replay_state {
…
bool is_paused = false;
};
struct replay_functions: action_functions {
…
void next_frame() {
if (replay_st.is_paused) return;
…
}
…The debugger confirms that two different replay_state structures seems to be allocated, i.e., current_replay_state's address doesn't match replay_st's one.
I'm only starting to try to grok this piece of code so any hint would be very much appreciated :D
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels