Posts: 8
Joined: Apr 2012
Reputation:
0
Hello!
When I rotate my desktop using "xrandr -o right/left" xbmc doesnt scale itself. I have to do this for a project. What could I do to fix this? I tried to match the source-code but I didn´t get any results.
I am using Fedora 16 with KDE.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
I've been over this with another user. As far as I understand, XBMC is doing everything correctly in choosing rotations (it does rotate, it just doesn't scale correctly).
However, the scaling works fine if you do NOT have rotation (eg setup a skin with a 9:16 skin resolution, use a 9:16 window to run XBMC in and things scale just fine).
What I believe is happening is that the width and height are not being interchanged somewhere in the GL matrix setup - thus, XBMC thinks it's rendering to a screen that's 1280x720 whereas it's actually 720x1280 (due to rotation) and thus the scaling in the horizontal and vertical directions is interchanged.
As I don't have such a setup I can't do much more than that. I'd suggest starting with the TestRender() routine in the GL renderer and get that displaying correctly - once you've fiddled around with the GL matrices there, you probably have a good idea of what is going on.
As I understand, this already works fine on win32 (directX) so is likely going wrong at the renderer level.
Cheers,
Jonathan
Posts: 2,752
Joined: Dec 2008
Reputation:
23
bobo1on1
cheapass Team-XBMC Developer
Posts: 2,752
2012-04-04, 23:55
(This post was last modified: 2012-04-05, 00:02 by bobo1on1.)
Rotation with RandR should be transparent to the applications, what I think happens is XBMC makes its window the same size as the display resolution, but this only works right if you have an upright or upside down orientation, or a square resolution.
Posts: 6,810
Joined: Jul 2010
Reputation:
198
I have tried today and it did work. (of course I had to enable rotate in xorg: Option "RandRRotation" "True"). What has been the problem and what version do you use?
Posts: 8
Joined: Apr 2012
Reputation:
0
I am using XBMC-11.0 Eden. In xorg.conf I added Option "RandRRotation" "true" under Section Device. Then I rotated my desktop using xrandr and then I started XBMC via console. What exactly does RandRRotation do?
Posts: 8
Joined: Apr 2012
Reputation:
0
Oh^^ XBMC does not scale itself. I have tried to replace the WinSystemX11 files with yours. Didn´t work for me.
Posts: 6,810
Joined: Jul 2010
Reputation:
198
Ah OK. I did not get you right first. The patch allows you to execute xrandr while XBMC is already running. But this does not solve your problem. The point is that current rotation is ignored for scaling. XBMC will always scale to the original x,y dimensions of a selected mode.
Posts: 8
Joined: Apr 2012
Reputation:
0
What if i just interchange the x and y coordinates of the selected mode? If I have understand you right, that could solve my problem because XBMC always scales to the x and y of the selected mode...Or am I wrong?