MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / SetIcon

Method SetIcon

Source/Engine/Platform/SDL/SDLWindow.cpp:1044–1052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1042}
1043
1044void SDLWindow::SetIcon(TextureData& icon)
1045{
1046 Array<Color32> colorData;
1047 icon.GetPixels(colorData);
1048 SDL_Surface* surface = SDL_CreateSurfaceFrom(icon.Width, icon.Height, SDL_PIXELFORMAT_ABGR8888, colorData.Get(), sizeof(Color32) * icon.Width);
1049
1050 SDL_SetWindowIcon(_window, surface);
1051 SDL_free(surface);
1052}
1053
1054#endif
1055

Callers 2

CreateMainWindowMethod · 0.45
CreateMainWindowMethod · 0.45

Calls 2

GetPixelsMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected