Anonymous avatar Anonymous committed 46de471

Default icon on linux/mac.

Comments (0)

Files changed (2)


 from SDL import *
 import pygame.base
+import pygame.pkgdata
 import pygame.surface
 _display_surface = None
 _icon_was_set = 0
+_icon_defaultname = 'pygame_icon.bmp'
 def __PYGAMEinit__():
         _display_surface = pygame.surface.Surface(surf=surf)
-    if sys.platform != 'darwin' and False: # XXX
+    if sys.platform != 'darwin':
         if not _icon_was_set:
-            iconsurf = _display_resource(_icon_defaultname)
-            SDL_SetColorKey(, SDL_SRCCOLORKEY, 0)
-            _do_set_icon(iconsurf)
+            file = pygame.pkgdata.getResource(_icon_defaultname)
+            iconsurf = pygame.image.load(file)
+            SDL_SetColorKey(iconsurf._surf, SDL_SRCCOLORKEY, 0)
+            set_icon(iconsurf)
     return _display_surface
New image
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.