Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where parse_time was parsing CLI flags on F5 #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

paoloose
Copy link

@paoloose paoloose commented Feb 18, 2023

Hi!!! I added a variable float start_time in main() to save the initial timer time, so there is no need to parse it again on F5.

Also restarting with F5 now has no effect on clock mode.

I couldn't resist changing the boolean integers as boolean types, sorry about that

fixes #29

@paoloose paoloose force-pushed the master branch 2 times, most recently from f570495 to 1ec5afe Compare February 18, 2023 07:30
@paoloose
Copy link
Author

That "force-pushed" is because I had to revert some commits I made that were not related to this pr

main.c Outdated
@@ -237,20 +239,10 @@ int main(int argc, char **argv)
} break;

case SDLK_F5: {
displayed_time = 0.0f;
paused = false;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this paused = false which was causing the paused state not to be maintained on F5. (Timers should automatically pause when they are restarted, this did the opposite)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Program exits on F5 trying to parse wrong flags
1 participant