nba-emu / NanoBoyAdvance

A cycle-accurate Nintendo Game Boy Advance emulator.
GNU General Public License v3.0
955 stars 53 forks source link

Log: Switch to fmt::text_style for coloring #365

Closed GranMinigun closed 4 months ago

GranMinigun commented 4 months ago

I got somewhat tired of all-magenta terminal.

Before you merge - what do you think of dropping colouring of info messages (instead of painting them white)?

fleroviux commented 4 months ago

Before you merge - what do you think of dropping colouring of info messages (instead of painting them white)?

I would be okay with doing that.

GranMinigun commented 4 months ago

Sorry, I should've explained what the issue is.

Log currently uses ANSI escape codes to set output line colour, but doesn't close with a reset code. This results in all subsequent terminal output being painted in whatever the last colour was set, even after the process has quit. This PR fixes that, and also makes it obvious what colours are used.

Pushed the change, should be ready to go.

fleroviux commented 4 months ago

Sorry, I should've explained what the issue is.

Ah, no worries. I got what this is doing. LGTM!