mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
Window: add buffer size arg to GetIconSurface
This commit is contained in:
parent
7b4caece2f
commit
9da9bc8014
1 changed files with 2 additions and 2 deletions
|
|
@ -16,9 +16,9 @@ public:
|
||||||
inline static int s_width;
|
inline static int s_width;
|
||||||
inline static int s_height;
|
inline static int s_height;
|
||||||
|
|
||||||
static SDL_Surface* GetIconSurface(void* pIconBmp = nullptr)
|
static SDL_Surface* GetIconSurface(void* pIconBmp = nullptr, size_t iconSize = 0)
|
||||||
{
|
{
|
||||||
auto rw = SDL_RWFromMem(pIconBmp ? pIconBmp : (void*)g_icon, g_icon_size);
|
auto rw = SDL_RWFromMem(pIconBmp ? pIconBmp : (void*)g_icon, pIconBmp ? iconSize : g_icon_size);
|
||||||
auto surface = SDL_LoadBMP_RW(rw, 1);
|
auto surface = SDL_LoadBMP_RW(rw, 1);
|
||||||
|
|
||||||
if (!surface)
|
if (!surface)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue