Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- import pygame
- pygame.init()
- pygame.display.init()
- res = (1024,768)
- pygame.display.set_mode(res,pygame.FULLSCREEN|pygame.HWSURFACE|pygame.DOUBLEBUF)
- screen = pygame.display.get_surface()
- # This creates a surface that does not match the display mode, which causes a
- # segmentation fault
- sfc = pygame.surface.Surface(screen.get_size())
- # Any of the two lines below should work:
- # sfc = pygame.surface.Surface(screen.get_size(), pygame.FULLSCREEN|pygame.HWSURFACE|pygame.DOUBLEBUF)
- # sfc = screen.copy()
- screen.blit(sfc,(0,0))
- # To avoid the segmentation fault a del statement works.
- #del(sfc)
- pygame.display.quit()
- pygame.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement