Skip to content
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

[Patch] [Windows] Wrong default icon size on windows systems #2229

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

[Patch] [Windows] Wrong default icon size on windows systems #2229

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 2.0
Reported for operating system, platform: Windows 7, x86

Comments on the original bug report:

On 2016-08-05 21:55:51 +0000, Evgeny Vrublevsky wrote:

Created attachment 2539
Patch, default icon is IDI_APPLICATION (32512)

Original code in the video/windows/SDL_windowsevents.c registers obsolete WNDCLASS (not WNDCLASSEX). As the result only one icon size is used as the small and normal icons. Also original code doesn't specify required size of an icon. As the result when 256x256 icon is available, the program uses it as a default icon, and it looks ugly.

We have to use WNDCLASSEX and load icons with proper sizes which we can get using GetSystemMetrics.

Also I propose to use IDI_APPLICATION (32512) as the default icon, because it often is used as a default icon. The patch in the attachment already includes this change.

On 2016-08-05 21:58:14 +0000, Evgeny Vrublevsky wrote:

Created attachment 2540
Patch, default icon is IDI_APPLICATION (32512)

Last time I had uploaded wrong file. This is the right version.

On 2016-08-05 22:05:57 +0000, Evgeny Vrublevsky wrote:

Created attachment 2541
Patch, default icon is SDL_Appname (SDL_app)

An alternative version. Uses SDL_Appname (SDL_app) as the name of a default icon, like it was before. Bad side of this variant that it is unexpected that changing SDL_Appname requires changing the name of a default icon also. Programmer can forget about it and the window of a game will be without an icon as the result.

On 2016-08-06 07:12:20 +0000, Evgeny Vrublevsky wrote:

Created attachment 2542
Patch, default icon is the first icon, like in the Explorer

Better idea. We could use the first icon from resources, like the Explorer does. Patch is included. It also correctly loads large and small icons, so it will look nice everywhere.

On 2016-08-08 14:04:08 +0000, Evgeny Vrublevsky wrote:

When you're writing a game using C# (in Visual Studio), it always uses 32512 (IDI_APPLICATION) as the name of an exe icon. It is not easy to change it.

Proposed solution with using of the first icon of an exe file as a default icon of the window will solve this problem, and it will not break compatibility with programs which are using "SDL_APP" as the resource name of an icon.

On 2016-10-01 20:17:28 +0000, Sam Lantinga wrote:

Fixed, thanks!
https://hg.libsdl.org/SDL/rev/5c06c3aaca68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant