WinRT window not always honouring fullscreen flag |
hardcoredaniel
Guest
|
Hi,
I found that my SDL program will typically be fullscreen when I request it by setting the flag, but when I install the app via the microsoft store and run it on standard PCs/Laptops with Windows 10, it will start in windowed mode instead. My program will be completely confused by this, because it expects that the resolution returned from the SDL_GetDisplayModes() call will be the one being applied when calling SDL_CreateWindow(). I saw in the code of SDL_winrtvideo.cpp, however, that the full screen call is just a "try" and might fail. What is the proper procedure to react on this when programming for WinRT? Shall I query the created window afterwards to check whether its full screen or not, to update the width and height values from the window if fullscreen was not available at that time? Alternatively, I could do the same thing I do for MacOS and iOS, where I query the renderer size after creating the renderer, whose dimensions can be different than the ones from the window if a high DPI window was created. Would any of this work, and what's the better choice? BTW, here's the link to the app: https://www.microsoft.com/en-us/store/games/wmelite-engine/9nblggh4wb5z Regards, Daniel |
|||||||||||
|
Re: WinRT window not always honouring fullscreen flag |
WinRT window not always honouring fullscreen flag |
hardcoredaniel
Guest
|
Hi David,
I was too fast publishing a workaround that I tried, so maybe you did not see the behaviour anymore. I saw the unexpected behaviour on "normal" laptops without touch input, after installing the app from the store. Starting it from within VS did not show this behaviour, but running the App Certification kit did. What I did now to assure full screen is to handle the "SDL_WINDOW_SHOWN" event and repeat the "tryFullscreen" call - which I did not see failing anymore from that time on. Not sure that this would catch all occurances though. I also added some experimental code to my SDL branch, that tries to tell Windows to remember the fullscreen preference. I added it as hint, not unconditionally. Please have a look at this commit: https://bitbucket.org/hcdaniel/wmelite-dependencies-for-linux-and-android/commits/1280cdd22806519a0fad68d3576cb880cf2198ba?at=default However, I cannot tell whether it will actually make a difference... Regards, Daniel ---------- Původnà zpráva ---------- Od: DLudwig Komu: Datum: 12. 6. 2016 22:57:53 Předmět: Re: [SDL] WinRT window not always honouring fullscreen flag
|
|||||||||||||
|