-
Notifications
You must be signed in to change notification settings - Fork 52
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
Several fixes and improvements... #134
base: master
Are you sure you want to change the base?
Conversation
@@ -1163,6 +1163,8 @@ int Minecraft::getFpsIntlCounter() | |||
|
|||
void Minecraft::leaveGame(bool bCopyMap) | |||
{ | |||
Keyboard::setBlocked(true); |
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.
When is the keyboard unblocked?
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.
Keyboard::reset() unblocks it - So, no worries...
IMO, instead of just disabling the keyboard arbitrarily while leaving the world, it would be better to determine (and fix) the actual bugs instead of just hiding them. |
You can do so by getting rid of the keyboard blocking code and reproducing the bug - but to be honest, I couldn't debug the root issues as I remember because:
I think I'll try to assess the root causes and uncomment it myself and provide a patch here too now, as I guess I'll really try this time. |
Correction: Or I did just really not try* - but I'll try now... |
* Fix root issue for white-screen issue when pressing ESC during world saves
This is used to exit out of menus, such as the pause menu, or inventory menu. I believe you have to override the |
Or just block all keyboard input during those scenes where any input isn't supposed to be handled anyway and call it a day? |
Can you put the following changes in a new PR?
The keyboard block functionality I completely disagree with. The underlying bugg can just be fixed. https://github.com/ReMinecraftPE/mcpe/pull/134/files#diff-b6f242667aac4d5605d75f5cfc05d95bc2b2487299360c9c7bb7a10bfc3148aaR42-R48 |
Sure but this is just a bandage fix. Simply fix the root cause and we're good to go. |
Ok. I personally thought it's OK since it's just client dev - if this was a server or any other mission-critical software then having a 1:1 ratio of fixing the actual root causes of bugs of course would be the one and only way to go. But I agree. I'll make a new PR in a bit! |
WAIT. Hold on, what about te OOB fixes? Push them or not?! |
I said that the font texture width generation needs to be rearchitected already. |
Added ability to arbritrarily block/unblock keyboard input at any time, fixes a 'white screen' issue when pressing ESC right at the time where the save screen is shown - on Linux this even segfaults for some reason, haven't investigated root cause but this definitely seems to reliably stop it from happening on a higher level.
Usage of SAFE_DELETE when SAFE_DELETE_ARRAY should be used for the sake of correctness
Zero-init float arrays in FireTexture constructors (I forgot why I did this, there was a reason I believe)
Fix OOB read during Font::init when initializing a Font that may not exist or has corrupted data (both VS-ASan and Dr.Memory complained about it)