Problem with full screen mode in double display rotated configuration
Opened this issue · 3 comments
Caprice32 v4.6.0-4ff4bfeaa82f0ca226858358646cb5aa135e9e40
Ubuntu 20.04.2
window manager: i3 4.19.1
graphic card: NVIDIA Corporation GK208B [GeForce GT 730]
drivers: nvidia 390.141
After rotating the right screen caprice32 is no longer working properly in full screen mode (F2). It worked fine prior to rotating the display, when I did some testing for issue #185.
The red rectangle shows the screen boundary:
Switching to full screen when caprice32 is in the right screen seems to work fine:
It seems to me that both the emulated display width and the vertical offset from the top of the screen to the top of the emulated display are the same in both cases and corresponds to the values when caprice32 is maximized in the right screen.
I'll see if I can reproduce which would make investigating and fixing easier.
Some thoughts from my initial search:
https://wiki.libsdl.org/SDL_GetRendererOutputSize
May be better than SDL_GetWindowSize.
SDL_WINDOW_SHOWN is ignored so can be removed:
https://wiki.libsdl.org/SDL_CreateWindow
https://stackoverflow.com/questions/18728821/multiple-displays-in-sdl2 has some interesting bits also about multiple displays
Sorry but I can't help very much there, I know almost nothing about SDL.
Let me know if you want me to do some more testing o try some patch.
SDL_GetRendererOutputSize doesn't help although from the documentation, it should be a better choice.
Digging a bit into it, this is a SDL issue. For some reason, it thinks that the window is on the primary display despite being on the secondary.
SDL_GetWindowDisplayIndex(window)
always returns 0 for me.