-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
can't get Fullwindow onto secondary screen #17
Comments
hmm, one of the SDL2 apps this works as expected is AGS, but they use some special code to deal with this: https://github.com/adventuregamestudio/ags/blob/master/Engine/platform/base/sys_main.cpp#L74 |
in my own app sdlbook, it also works by default but i use the following code to toggle fullscreen_desktop using the existing window: https://github.com/rofl0r/SDLBook/blob/master/ezsdl.h#L401 (i got a newer version of that line locally that actually uses SDL_WINDOW_FULLSCREEN_DESKTOP) |
tried using SDL_WINDOWPOS_UNDEFINED instead of SDL_WINDOWPOS_CENTERED but that doesn't make a difference. when switching to full-window, the screen the window is on goes black for half a second, as if trying to make the full-screen window there, then it moves over to the other screen again. |
ok the issue is that after the window is set fullscreen, it's getting destroyed again by
at having single-stepped through all code after the initial resolution change, i must say this whole code is utterly complex and confusing. there's code all over the place checking whether the prefs changed and then tearing everything down that's been built up just before. like SDL textures, renderers, windows. if you wanna beat some sense into that code, you gotta rip out all code that tries to detect a configuration change, and only do the respective actions right after the emulation returns from the F12 window. |
i managed to fix it by saving the current screen number before destroying the freshly full-screened window. this has been the most frustrating debugging session since i had to debug the 60 line macros of boehm gc 10 yeats ago. |
Welcome to a glimpse of the horrible mess that is UAE code... :) |
ok, i guess to make something productive out of my patch without refactoring the whole mess, i'd suggest:
|
actually, i think it would be nice if emulator window would always be created on the same screen as F12 gui window (unless the saved position indicates otherwise - someone might want to have the F12 window deliberately on a side screen). so on start, you pull the gui window to screen you want it, then hit start and emulator is on that same screen. |
I'm working on rewriting some parts of the gfx code, so I'll look into it as part of that. |
Describe the bug
amiberry starts up on the primary screen, which in my case is smaller and on the side. when i switch to windowed and pull the the window onto the secondary screen, then switch to fullwin again, the emulator display moves back to the small primary screen.
this is the first time i hit this behaviour with an app using SDL2, other SDL2 apps switch to fullscreen-desktop mode on the screen the window is currently on. it's as if there's some special code dealing with multiple screens in amiberry that somehow misbehaves.
This is on linux running X11. SDL2 is version SDL2-2.28.5.
The text was updated successfully, but these errors were encountered: