![]() |
Patch: Fullscreen to windowed mode switch | ![]() |
![]() |
Patch: Fullscreen to windowed mode switch | ![]() |
javierecf
![]() |
![]() |
+1 for this fix, It would be really nice to not have the last blink of resolution when closing an app.
2014-05-24 9:55 GMT-06:00 Melesie:
-- Javier Flores |
||||||||||||
|
![]() |
Patch: Fullscreen to windowed mode switch | ![]() |
Sam Lantinga
![]() |
![]() |
This patch is in, thanks!
On Mon, May 26, 2014 at 9:24 PM, Javier Flores wrote:
|
||||||||||||||
|
![]() |
Patch: Fullscreen to windowed mode switch | ![]() |
javierecf
![]() |
![]() |
i dont know if it is because of this patch, or something else. I switch between fullscreen and window mode on my app, with:
if(fullscreen){ SDL_SetWindowFullscreen(glrender->main_window, SDL_TRUE); } else{ SDL_SetWindowFullscreen(glrender->main_window, SDL_FALSE); } and with 2.0.3 it works, i just compiled and linked from the lastest source and fullscreen works, but instead of returning to windowed mode it stays as fullscreen but with a black background filling the desktop, similar to FULLSCREEN_DESKTOP. But i wanted to return to window mode. any ideas? 2014-05-31 13:22 GMT-06:00 Sam Lantinga:
-- Javier Flores |
||||||||||||||||
|
![]() |
Patch: Fullscreen to windowed mode switch | ![]() |
javierecf
![]() |
![]() |
Anyway, i changed to FULLSCREEN_DESKTOP and used virtual resolution with sdl_gpu, not really sure if other people will have the same problem using the sdl rendering system though.
2014-05-31 23:48 GMT-06:00 Javier Flores:
-- Javier Flores |
||||||||||||||||||
|
![]() |
![]() |
Melesie
![]() |
![]() |
I haven't had any issues with this so far, but I have to say I do all rendering myself instead of SDL. Have you tried reverting the change in WIN_SetDisplayMode to the previous one to see if it is indeed the culprit?
|
||||||||||
|
![]() |
Patch: Fullscreen to windowed mode switch | ![]() |
javierecf
![]() |
![]() |
yeah i revert the changes and tested it, now it works as before.
Fullscreen -> Window -> Exit = Black blink resolution change at the end of the application. with the patch is goes: Fullscreen -> Fullscreen_Desktop (desktop fill with black, it does not return to window mode) -> Exit = No black blink resolution change at the end of the application. using SDL_SetWindowFullscreen to toggle fullscreen and window mode. 2014-06-01 11:42 GMT-06:00 Melesie:
-- Javier Flores |
||||||||||||
|
![]() |
Patch: Fullscreen to windowed mode switch | ![]() |
javierecf
![]() |
![]() |
solved, while changing to window mode you need to resize and reposition the window.
going from fullscreen to window mode: Â SDL_SetWindowFullscreen(glrender->main_window, SDL_FALSE); Â SDL_SetWindowSize(glrender->main_window, SCREEN_WIDTH, SCREEN_HEIGHT); Â SDL_SetWindowPosition(glrender->main_window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED); this is using the current patch, not reverting anything. 2014-06-01 17:36 GMT-06:00 Javier Flores:
-- Javier Flores |
||||||||||||||
|
![]() |
![]() |
Melesie
![]() |
![]() |
That's true. I got bitten by this little detail myself. Oddly enough, this does not happen all the time. For example Window->Fullscreen(1280x720)->Window does not resize the window back to its original dimensions, while Window->Fullscreen(1920x1080)->Window does return it back. I suspect it's because 1920x1080 is the default display mode. I will have to look into it some more, since I'm not sure this is a bug or a hidden feature of SDL.
![]() |
||||||||||
|