fallahn / crogine

SDL2 Based Game Framework
82 stars 12 forks source link

High resolution icon on Mac is overridden by Lower res one #96

Closed JonnyPtn closed 4 months ago

JonnyPtn commented 8 months ago

This relates to Window::setIcon - I think on Windows this relates to the tiny icon in the top left of the window so a low res image works fine, but on Mac it actually sets the icon in the doc which is much higher resolution so using the same image for both looks rubbish on Mac.

This also overrides the higher res .icns file which is part of the mac bundle so it means the app looks great in the doc until you launch it, at which point it changes to the low res version.

I expect most of this behaviour is dictated by SDL_SetWindowIcon so not sure how much control we have, but I'd guess the solution is to either use a higher resolution image (would need to check how that appears on windows) or to bypass the function on mac builds. I'd say the former is better if possible

fallahn commented 8 months ago

Ah. Yes I'm sure it'll accept images of varying sizes - I'll try with a larger icon first and if Windows doesn't like it I'll just ifdef it per platform.

fallahn commented 8 months ago

OK I've disabled it on mac for now - the icon set in the bundle (should) just take over. It means there's no window icon when running non-bundle builds, but I think that's irrelevant as I only used those during development.

JonnyPtn commented 4 months ago

Yep all good on latest build