We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2841 - Hint to set resource id for window icon
Summary: Hint to set resource id for window icon
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.3
Hardware: x86 Windows (All)
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-10 17:55 UTC by Alexey
Modified: 2017-08-13 21:17 UTC (History)
1 user (show)

See Also:


Attachments
patch (1.59 KB, patch)
2015-01-10 17:55 UTC, Alexey
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2015-01-10 17:55:53 UTC
Created attachment 1989 [details]
patch

Seems to be a missing functionality. I want to set an icon from RC file. I cant pass MAKEINTRESOURCE(X) string to SDL_RegisterApp() cause string returned by MAKEINTRESOURCE string is not actually a string and SDL_strlen will crash. Moreover LoadImage seems to be loading wrong icon size. LoadIcon seems to be fine.
Comment 1 ntzrmtthihu777 2017-03-04 03:36:38 UTC
I too wish for something of the sort, and apparently so do n amount of stackoverflow and github gisters. We need a standard way to do this for the windows platform.
Comment 2 Sam Lantinga 2017-08-13 21:17:09 UTC
I added two hints, one for the large and one for the small icon:
SDL_HINT_WINDOWS_INTRESOURCE_ICON
SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL

https://hg.libsdl.org/SDL/rev/2d458a198021

Thanks!