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

Problem with full screen mode in double display rotated configuration #207

Open
patxoca opened this issue Apr 11, 2021 · 3 comments
Open

Comments

@patxoca
Copy link

patxoca commented Apr 11, 2021

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:

cap32-fullscreen

Switching to full screen when caprice32 is in the right screen seems to work fine:

cap32-fullscreen2

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.

@ColinPitrat
Copy link
Owner

ColinPitrat commented Apr 12, 2021

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

@patxoca
Copy link
Author

patxoca commented Apr 13, 2021

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.

@ColinPitrat
Copy link
Owner

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.

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