I’m experiencing some issues with Pygame.show.data () and full display possession in Linux. The sport reveals roughly 1.5 instances the display measurement. I noticed different questions that there’s a recognized resolution for Home windows, however nothing for Linux. I’m publishing this query as a result of StackexChange is not going to permit me to touch upon the opposite chains till I’ve extra popularity.
The opposite two questions:
https://stackoverflow.com/Questions/27421391/pygame-display-info-giving-wrong-resolution-size
Pygame Fullsreen visualization downside
One of many proposed options for Home windows was to insert three strains of code:
ctypes.windll.user32.SetProcessDPIAware()
true_res = (windll.user32.GetSystemMetrics(0),windll.user32.GetSystemMetrics(1))
pygame.show.set_mode(true_res,pygame.Fullscreen)
The earlier code makes use of Ctypes, so solely Home windows has an answer to this point. I respect any assist!
Under is the code part in my challenge that provides me issues.
# Initialize pygame
pygame.init()
# Get display data for fullscreen
screen_info = pygame.show.Information()
WIDTH = screen_info.current_w
HEIGHT = screen_info.current_h
# Display screen setup - fullscreen mode
display = pygame.show.set_mode((WIDTH, HEIGHT), pygame.FULLSCREEN)