Hyperpixel4 pygame landscape


I want to use the HyperPixel4 in landscape mode.
In boot/config.txt I’ve added these two lines:


This is doing the job, in CLI mode the screen is in landscape. Even startx opens in landscape mode.
But when I start a pygame script the screen is in portrait mode.

Any ideas?

I have de latest Bullseye OS, installed pygame and sdl2 nothing more.

Thank you in advance