1. pygame
  2. Untitled project
  3. pygame

Commits

aholkner  committed 46de471

Default icon on linux/mac.

  • Participants
  • Parent commits 73a01c8
  • Branches ctypes-soc

Comments (0)

Files changed (2)

File pygame/display.py

View file
 
 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__():
     pygame.base.register_quit(_display_autoquit)
     else:
         _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(iconsurf.surf, 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
 

File pygame/pygame_icon.bmp

Added
New image