MCPcopy Create free account
hub / github.com/The-Powder-Toy/The-Powder-Toy / WindowIcon

Function WindowIcon

src/WindowIcon.cpp:7–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "icon_exe_png.h"
6
7void WindowIcon(SDL_Window *window)
8{
9 if (auto image = format::PixelsFromPNG(icon_exe_png.AsCharSpan()))
10 {
11 SDL_Surface *icon = SDL_CreateRGBSurfaceFrom(image->data(), image->Size().X, image->Size().Y, 32, image->Size().Y * sizeof(pixel), 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
12 SDL_SetWindowIcon(window, icon);
13 SDL_FreeSurface(icon);
14 }
15}

Callers 1

SDLSetScreenFunction · 0.85

Calls 2

dataMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected