Hyperpixel4 pygame landscape

Hello,

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

dtoverlay=vc4-kms-dpi-hyperpixel4
dtparam=rotate=270,touchscreen-swapped-x-y,touchscreen-inverted-x

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

I’ve got the same issue. Fresh install of Raspberry Pi OS Lite bullseye (fully updated), Python3, latest pygame, & SDL2. Also same configuration as previously mentioned. Logging in, the CLI us in proper landscape mode. When I run my python script form the CLI, it displays in portrait mode.

It seems strange that SDL2 isn’t capable of determining orientation. I also tested a similar app in C w/ SDL2- same results.

Does anyone know what might be happening? or how to get SDL2 to respect the orientation?