# HG changeset patch # User sheepluva # Date 1447454779 -3600 # Node ID 011c5cc195ccb40ea0fc8eb352b782d6b7cbfa5a # Parent 208bc571f949eea70967a97122e532aae6d17a2e set engine window icon in sdl2 diff -r 208bc571f949 -r 011c5cc195cc hedgewars/SDLh.pas --- a/hedgewars/SDLh.pas Fri Nov 13 22:35:26 2015 +0100 +++ b/hedgewars/SDLh.pas Fri Nov 13 23:46:19 2015 +0100 @@ -1063,6 +1063,8 @@ function SDL_SaveBMP_RW(surface: PSDL_Surface; dst: PSDL_RWops; freedst: LongInt): LongInt; cdecl; external SDLLibName; function SDL_CreateWindow(title: PChar; x,y,w,h: LongInt; flags: LongWord): PSDL_Window; cdecl; external SDLLibName; +procedure SDL_SetWindowIcon(window: PSDL_Window; icon: PSDL_Surface); cdecl; external SDLLibName; + function SDL_CreateRenderer(window: PSDL_Window; index: LongInt; flags: LongWord): PSDL_Renderer; cdecl; external SDLLibName; function SDL_DestroyWindow(window: PSDL_Window): LongInt; cdecl; external SDLLibName; function SDL_DestroyRenderer(renderer: PSDL_Renderer): LongInt; cdecl; external SDLLibName; diff -r 208bc571f949 -r 011c5cc195cc hedgewars/uStore.pas --- a/hedgewars/uStore.pas Fri Nov 13 22:35:26 2015 +0100 +++ b/hedgewars/uStore.pas Fri Nov 13 23:46:19 2015 +0100 @@ -1084,6 +1084,15 @@ SDLwindow:= SDL_CreateWindow(PChar('Hedgewars'), x, y, cScreenWidth, cScreenHeight, flags); SDLTry(SDLwindow <> nil, 'SDL_CreateWindow', true); + // load engine ico + {$IFNDEF DARWIN} + ico:= LoadDataImage(ptGraphics, 'hwengine', ifIgnoreCaps); + if ico <> nil then + begin + SDL_SetWindowIcon(SDLwindow, ico); + SDL_FreeSurface(ico); + end; + {$ENDIF} SetupOpenGL(); if reinit then