mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
isleapp: Set icon on non-windows systems
This commit is contained in:
parent
b435b6f7d1
commit
90b546f93e
@ -486,6 +486,21 @@ MxResult IsleApp::SetupWindow()
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
SDL_Surface *icon = SDL_CreateSurfaceFrom(
|
||||
ISLE_ICON.width,
|
||||
ISLE_ICON.height,
|
||||
SDL_PIXELFORMAT_RGBA32,
|
||||
(void*)ISLE_ICON.pixel_data,
|
||||
ISLE_ICON.width * ISLE_ICON.bytes_per_pixel
|
||||
);
|
||||
|
||||
if (icon) {
|
||||
SDL_SetWindowIcon(m_windowHandle, icon);
|
||||
SDL_DestroySurface(icon);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!SetupLegoOmni()) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
@ -3,3 +3,7 @@
|
||||
#define ISLE_BUSY 104
|
||||
|
||||
#define APP_ICON 105
|
||||
|
||||
#ifndef _WIN32
|
||||
#include "isle.h"
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user