- icon_filename = 'robot_512.png'
- pygame.display.set_icon(r.get_image(icon_filename, basedir='icons'))
+ # OSX accepts big icons, but scales up small icons smoothly
+ icon_size = 512
+ elif sys.platform == 'win32':
+ # It's corrupted at any smaller size. And crashes, at larger sizes.
+ icon_size = 32
+ else:
+ icon_size = 24
+ pygame.display.set_icon(
+ r.get_image('robot_%i.png' % icon_size, basedir='icons'))