*******************************************************************************/
-#include <SDL/SDL_image.h>
-
#include "Dispatch.hh"
#include "Engine.hh"
#include "Exception.hh"
+#include "Image.hh"
#include "Log.hh"
#include "Settings.hh"
#include "Video.hh"
{
if (mAttribs.icon != "")
{
- SDL_Surface* icon = IMG_Load(mAttribs.icon.c_str());
- if (icon)
- {
- SDL_WM_SetIcon(icon, 0);
- SDL_FreeSurface(icon);
- }
+ Image icon(mAttribs.icon);
+ icon.setAsIcon();
}
}