Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDL2 2.32.x] Raspberry PI CM4 display rotation #12508

Open
michael1413 opened this issue Mar 10, 2025 · 2 comments
Open

[SDL2 2.32.x] Raspberry PI CM4 display rotation #12508

michael1413 opened this issue Mar 10, 2025 · 2 comments
Milestone

Comments

@michael1413
Copy link

My display need a rotation from 270 ° / display size 800x1280

I use this code to rotate the screen


SDL_SetRenderTarget(Display.renderer, NULL);
SDL_RenderCopyEx(Display.renderer, Display.targetrender, &Display_Rect, &Display_Rect_Map, Display_Rotate_Angle, &Display_Rotate, 0);
SDL_RenderPresent(Display.renderer);
SDL_SetRenderTarget(Display.renderer, Display.targetrender);


It works under before version 2.32.x,, after the output is not rotated.

Render info is the same for both versions:

Renderer: opengles2 Software=0 Accelerated=1, Presentvsync=1 Targettexture=1
Current Mode bpp 32 SDL_PIXELFORMAT_ARGB8888 800 x 1280
INFO: SDL_GetNumVideoDisplays(): 1
INFO: SDL_GetNumDisplayModes: 1
INFO: Mode 0 bpp 32 SDL_PIXELFORMAT_ARGB8888 800 x 1280
INFO: Current Mode 0 bpp 32 SDL_PIXELFORMAT_ARGB8888 800 x 1280
Touch Devices = 1

I use the vc4-fkms-v3d-pi4 driver

@slouken
Copy link
Collaborator

slouken commented Mar 10, 2025

Can you use git bisect to find out where it was broken?

@slouken slouken added this to the 2.x milestone Mar 10, 2025
@michael1413
Copy link
Author

9f7ccbe is the first bad commit
commit 9f7ccbe
Author: Ryan C. Gordon [email protected]
Date: Fri Oct 4 02:32:24 2024 -0400

opengles2: Restore previous default texture_formats.

They were inadvertently byteswapped when making the rest of the backend
bigendian-friendly.

Fixes #11031.

:040000 040000 9a3c6c85542ca1bf8db1d324477910369ddb3f09 6501cadc5cda269bb4d8148365518e85c5233225 M src

9f7ccbe doesn't work
643437f works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants