+/*
+ * Copyright (C) 2003-2010 Neverball authors
+ *
+ * NEVERBALL is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2 of the License,
+ * or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ */
+
#include <stdio.h>
#include <stdlib.h>
void set_SDL_icon(const char *filename)
{
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(_WIN32)
SDL_Surface *icon;
if ((icon = load_surface(filename)))
free(icon->pixels);
SDL_FreeSurface(icon);
}
-#endif /* __APPLE__ */
+#endif
return;
}
void set_EWMH_icon(const char *filename)
{
-#if SDL_VIDEO_DRIVER_X11
+#if SDL_VIDEO_DRIVER_X11 && !SDL_VIDEO_DRIVER_QUARTZ
SDL_SysWMinfo info;
Display *dpy;
if (SDL_GetWMInfo(&info) != 1)
{
- fprintf(stderr, _("Failed to get WM info: %s\n"), SDL_GetError());
+ fprintf(stderr, L_("Failed to get WM info: %s\n"), SDL_GetError());
return;
}
* [*] http://standards.freedesktop.org/wm-spec/latest/
*/
- if ((p = image_load(config_data(filename), &w, &h, &b)))
+ if ((p = image_load(filename, &w, &h, &b)))
{
long *data = NULL;
free(data);
}
else
- fputs(_("Failed to allocate memory for EWMH icon data.\n"), stderr);
+ fputs(L_("Failed to allocate memory for EWMH icon data.\n"), stderr);
free(p);
}