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

Summary: Hint to set resource id for window icon
Product: SDL Reporter: Alexey <alexey.petruchik>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2 CC: ntzrmtthihu777
Version: 2.0.3   
Hardware: x86   
OS: Windows (All)   
Attachments: patch

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!