Skip to content

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

Closed
@michael1413

Description

@michael1413

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions