-
-
Notifications
You must be signed in to change notification settings - Fork 99
Small bug fix. #231
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
Small bug fix. #231
Conversation
Exception handler now automatically returns to the HBC after timeout + Added a message that tells the user that they can press reset (or Z on their GameCube Controller) to skip timeout because users tended to just unplug their Wiis from power.
|
Hi! thanks for the PR, i like the message being expanded! however, im not a fan that can you change your code to reflect those changes? |
|
Sure! give me one minute. |
libogc/exception.c
Outdated
| while ( 1 ) | ||
| { | ||
| if(reload_timer > 0) { | ||
| kprintf("\r\tReloading in %d seconds ", reload_timer/50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this even needed? this would reprint this message on every loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this to give the user feedback about how much time is left before reloading, just so they don't assume that their Wii has crashed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to clear the line and reprint then. lookup console escape codes to clear line ^^
or find ways to clear previous line and reprint then :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed when you do a \r, it tells the console to go back to the start of the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this on real hardware and dolphin and it works flawlessly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the extra space at the end of the line was to mitigate that. I think clearing the line is still ideal though, the code is "\e[2K"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good now.
|
@DacoTaco Using \x1b[2K seems to not work? |
|
I'm reverting to \r because it's simpler (and works fine). |
|
@abdelali221 |
|
I'd like to know what's the point of doing a \x1b[2K first. |
because what do you think will happen if you have 10 seconds until reload, and then printf with 9 seconds? or 100 seconds? |
|
That's the whole point of having a space at the end. |
|
your space doesn't catch all cases, and is a nasty fix for the problem. cleaned up and tested the code myself. |
Exception handler now automatically returns to the HBC after timeout + Added a message that tells the user that they can press reset (or Z on their GameCube Controller) to skip timeout because users tended to just unplug their Wiis from power.