isleapp: Set icon on non-windows systems

This commit is contained in:
AllMeatball 2025-05-14 11:16:29 -05:00
parent b435b6f7d1
commit 90b546f93e
2 changed files with 19 additions and 0 deletions

View File

@ -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;
}

View File

@ -3,3 +3,7 @@
#define ISLE_BUSY 104
#define APP_ICON 105
#ifndef _WIN32
#include "isle.h"
#endif