MrAlaux / Nugget-Doom

Nugget Doom is a fork of Woof! with additional features.
GNU General Public License v2.0
60 stars 3 forks source link

Allocate status bar buffer based on sbar height #72

Closed ceski-1 closed 11 months ago

ceski-1 commented 11 months ago

Fixes https://github.com/MrAlaux/Nugget-Doom/issues/71

ceski-1 commented 11 months ago

@MrAlaux When you update the changelog, please credit Fabian for the solution.

MrAlaux commented 11 months ago

@MrAlaux When you update the changelog, please credit Fabian for the solution.

Would you mind if I credit you too? You did make the PR after all.

ceski-1 commented 11 months ago

Would you mind if I credit you too? You did make the PR after all.

Sure, no problem.

MrAlaux commented 11 months ago

The warnings are emitted every time the screen is restarted, I think that's unnecessary. Could you add something along the lines of static boolean firsttime to ST_loadGraphics() to only print them once? Woof is affected too, but maybe Fabian does want to keep the multiple warnings.

Unrelated: excuse me @fabiangreffrath, the following weird characters are printed alongside the warnings: imagen I remember seeing some relevant commits regarding that output, but I don't remember the details and if this is expected. Mind the antique window style, that's actually Win7.

ceski-1 commented 11 months ago

The warnings are emitted every time the screen is restarted, I think that's unnecessary.

I agree, they only show once now.

MrAlaux commented 11 months ago

Alright, looks good to me. Anything left you can think of?

ceski-1 commented 11 months ago

I'm happy with this but maybe wait for the upstream PR in case there are more changes.

fabiangreffrath commented 11 months ago

Unrelated: excuse me @fabiangreffrath, the following weird characters are printed alongside the warnings:

This means that this code doesn't work on your system. @rfomin any ideas?

https://github.com/fabiangreffrath/woof/blob/54eb621036c0e5b9abe57fec8aad2eb3f3908367/src/i_printf.c#L63-L83

rfomin commented 11 months ago

Unrelated: excuse me @fabiangreffrath, the following weird characters are printed alongside the warnings:

This means that this code doesn't work on your system. @rfomin any ideas?

https://github.com/fabiangreffrath/woof/blob/54eb621036c0e5b9abe57fec8aad2eb3f3908367/src/i_printf.c#L63-L83

It seems ENABLE_VIRTUAL_TERMINAL_PROCESSING works only on Windows 10+. I will try to fix this.

rfomin commented 11 months ago

@MrAlaux could you please test this commit https://github.com/fabiangreffrath/woof/commit/3c546497117231910fccba0979a18640f4e64df3 ? Error messages should appear in the console without extra characters.

MrAlaux commented 11 months ago

@MrAlaux could you please test this commit fabiangreffrath@3c54649 ? Error messages should appear in the console without extra characters.

Yep, seems to be working. See:

Before ![imagen](https://github.com/MrAlaux/Nugget-Doom/assets/73968015/7b0bdcf4-1815-41eb-aab1-79734ba946f3)
After ![imagen](https://github.com/MrAlaux/Nugget-Doom/assets/73968015/10377c4a-f49c-4fe8-928e-c8f1aa15d412)
fabiangreffrath commented 11 months ago

Thank you @rfomin!