Fullscreen - issues with DirectX and OpenGL |
.3lite
|
My bad - I did forget to mention that I was setting display mode within DirectX context when resetting parameters of the device:
That is why it properly went into a full screen on a non maximized window. Still, the behaviour is really strange and different on each context. |
|||||||||||||
|
.3lite
|
The question is how to properly go into a fullscreen mode (the highest available resolution) by using function SDL_SetWindowFullscreen in both contexts?
|
|||||||||||
|
LBandy
|
Have you tried this?
|
|||||||||||||
|
.3lite
|
I did switch to SDL_WINDOW_FULLSCREEN_DESKTOP recently. However, even though I had SDL_WINDOW_FULLSCREEN_DESKTOP and size of current window was 640x480 the fullscreen instead of being 1920x1080 was 640x480. There are no events dispatched from SDL2 indicating a correct new resolution, however, sometimes it works (it depends whether the window is maximized, taking almost the whole screen, or it is a small window).
What I am currently doing is resizing the window to the size of the display and then going into a fullscreen - it seems to work most of the time, but with SDL_WINDOW_FULLSCREEN_DESKTOP I have yet another issue which did not happen on "true" fullscreen. The window seems to lose focus when going into a fullscreen at the first time from a small window. That is the window is visible at fullscreen, but my mouse events are focused at applications available at the background resulting in minimizing my window when I click anywhere on the screen, but when I go back the window has focus and everything works fine. The issue is happening only with Direct3D context. It does not happen with OpenGL context created by the SDL2 itself. |
|||||||||||
|