Make the icon crisper on OSX
authorStefano Rivera <stefano@rivera.za.net>
Fri, 16 May 2014 21:30:09 +0000 (23:30 +0200)
committerStefano Rivera <stefano@rivera.za.net>
Fri, 16 May 2014 21:30:24 +0000 (23:30 +0200)
naja/__main__.py

index 7bc1442f33b4113bdb91db71562d7da54a7c32c0..02f49a3e7c8c2298537f06347dc9b6dcdced6f91 100644 (file)
@@ -21,7 +21,11 @@ def main():
     # can't use convert_alpha until we've created a window with set_mode
     r = Loader('data')
     r.CONVERT_ALPHA = False
-    pygame.display.set_icon(r.get_image('robot_24.png', basedir='icons'))
+    icon_filename = 'robot_24.png'
+    # OSX accepts big icons, but scales up small icons smoothly
+    if sys.platform == 'darwin':
+        icon_filename = 'robot_512.png'
+    pygame.display.set_icon(r.get_image(icon_filename, basedir='icons'))
 
     pygame.display.set_mode(SCREEN, pgl.SWSURFACE)
     pygame.display.set_caption('Robolock II')