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. |
| while ( 1 ) | ||
| { | ||
| if(reload_timer > 0) { | ||
| kprintf("\r\tReloading in %d seconds ", reload_timer/50); |
There was a problem hiding this comment.
is this even needed? this would reprint this message on every loop
There was a problem hiding this comment.
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.
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.
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.
I tested this on real hardware and dolphin and it works flawlessly.
There was a problem hiding this comment.
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.
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.