Parcourir la source

screen.py now uses GTK to determine screen size instead of pygame.

Taddeus Kroes il y a 13 ans
Parent
commit
797a686e3b
1 fichiers modifiés avec 2 ajouts et 6 suppressions
  1. 2 6
      src/screen.py

+ 2 - 6
src/screen.py

@@ -1,11 +1,7 @@
-import pygame.display
+from gtk.gdk import Screen
 
 
-# get screen resolution
-pygame.display.init()
-_info = pygame.display.Info()
-_w, _h = screen_size = _info.current_w, _info.current_h
-pygame.display.quit()
+_w, _h = screen_size = Screen().get_root_window().get_size()
 
 
 def pixel_coords(x, y):