I've spent the past week creating a raycasting algorithm in Python using Pygame, and it ran perfectly fine before I added textures to the walls. But now when running in windowed mode the mouse input does not work properly, and as a solution I made it so that the q and e keys do the job of turning the camera instead. My code can be found here, but to run it in windowed mode you'll have to change these lines:
WIDTH = 1360
HEIGHT = 768
SCREEN = pygame.display.set_mode((WIDTH, HEIGHT), pygame.HWSURFACE|pygame.DOUBLEBUF|pygame.FULLSCREEN)
To these lines:
WIDTH = 680
HEIGHT = 384
SCREEN = pygame.display.set_mode((WIDTH, HEIGHT))
So that the entire screen can be seen in windowed mode.
So why is it that the mouse input doesn't work properly, and what can I do to fix it?