RetroArch
RetroArch copied to clipboard
Menu ignores video_rotation configuration
Description
The menu doesn't rotate with the video_rotation configuration set to something else than 0. Unless we can rotate the framebuffer (which we can't yet), this will be needed to have Lakka on the Nintendo Switch.
Expected behavior
The menu should rotate as well as the cores, without any stretching issues.
Actual behavior
Nothing happens for the menu, and the cores image is stretched.
Steps to reproduce the bug
- Open RetroArch in a menu
- Set the video rotation to some degree in the options
- See that the menu is not rotated
- Open some content, see that it's stretched
Bisect Results
This option was never meant to rotate the menu.
Version/Commit
- RetroArch: d360265
Environment information
- OS: Lakka on the Nintendo Switch (no xorg server)
- Compiler: Lakka build script
This code is about knowing that the display should be rotated.
Here (Lakka on the Switch), we're targeting very specific hardware where we already know that the display should be rotated. The issue being : how should we rotate it ? For now, we can't.
This should be considered a fairly major issue in all regards, simply because physically rotating a display is a real thing. Hopefully it's not a majorly difficult thing to accomplish, but it's certainly impressive to see not already implemented!
@natinusala Yes right it is just for knowing the orientation.
It seems there is rotation kms properties.
There is now a screen_orientation setting for handling this.
@bparker06 Screen Orientation rotates all screen, not only Retroarch window content.
That's correct
On Fri, Mar 8, 2019, 07:37 ofry [email protected] wrote:
@bparker06 https://github.com/bparker06 Screen Orientation rotates all screen, not only Retroarch window content.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/libretro/RetroArch/issues/6770#issuecomment-470914274, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpC0Lm_6QqSLOiXP052m6N69khXEbXFks5vUlmPgaJpZM4T8cXb .
As I can see in the commits implementing this, it only work with X11 and Win32 drivers.
(I'm trying to configure rotation in Lakka-Generic.x86_64-2.2.2.img and it does not work.)
@smokku it is working on X11 and on Lakka Generic we are using DRM/KMS not X11.
I tried to use it on latest Lakka on a PC with nVidia card and:
- the menu option is not visible in UI (with advanced options enabled)
- when changing
screen_orientation=1by directly editing the config file - rotation did not change
@smokku May you try with image.
@gouchi Are you talking about the screen_orientation setting working in Lakka? Because I don't see a display server in RA for DRM, so I don't see how that could work.
I browsed briefly through DRM/KMS docs and there is plane rotation property. I will look into adding support for screen_orientation to DRM/KMS diriver.
The screen rotation property is just for information purposes - we still need to flip the coordinates and rotate the display inside of retroarch
I thought it looked too easy. ;-)
@bparker06 the image provided is special one for nVidia card which runs X11.
Any hints on workflow for developing DRM/KMS driver? When switch to VTY and run retroarch it works, but I have no keyboard controls (no matter which input driver I enter in config) - to the point I cannot switch back to X. I need to ssh to my machine and kill retroarch to regain keyboard. ;-)
Are you in the input group ?
You may try this documentation about DRM/KMS. Also you can use modetest from libdrm (autotools | meson) to get display information and set resolution.
There is this code in RA but somebody more familiar will have better answer.
Thanks for the /dev/input tip.
I also needed ./configure --enable-udev.
Now it works on VTY. :)
A bit more digging through code and I see that screen_orientation is a setting specific to a display server (currently: android, null, win32, x11) and uses display server facilities to rotate the whole display on the OS level.
The setting video_rotation is for core only, so even implementing it in drm_gfx driver would not help rotating the menu.
OK. This is a lot more involved.
Any information on why menu is not affected by video_rotation setting?
Because it's not implemented, and it's also not meant to rotate the menu
Is there a use case, when one would like to rotate the core, but not the menu?
Arcade or Nintendo DS cores for instance
I do understand that there are games and emus that use vertical screen layout. In fact, I've built an arcade cabinet with vertical screen, because I play mostly vertical shooters. That's why I am interested in working on this feature - I would like to use Lakka with my cabinet.
It puzzles me though for an use case when you would like the menu not rotated, but rotated game/core. I guess for devices which you can easily rotate, like mobile phone, this could be useful to have horizontal menu and vertical game... IDK
As I said, desmume has the ability to request a rotation to the frontend because whatever current content needs the display to be rotated - I'm sure it's not the only core
And that rotation request directly overrides that video rotation settings I believe
Hard to follow this thread with regards to screen_orientation setting. Seems like it works on some systems and not others? I'm wondering why this is a Lakka or RA issue. Doesn't linux support setting the screen orientation?
@unformatt We don't use Xorg by default on Lakka, so you can't use screen_orientation, but there is an experimental version dedicated for Nvidia cards which is using Xorg so you could change screen orientation with this version.
Any update on this topic about screen_orientation working in a KMS/DRM environment?
Any further update on an implementation for menu rotation with DRM/KMS?
I'm assuming there is an limitation within RetroArch which is making this a difficult feature to add.