Window Quirk
This is minor for OS X. When the game window updates, it always moves to the upper-left side of the screen.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Maintainer
Odd, the code is setup to center the window:
static void SDLSetMode(INT32 width, INT32 height, SDL_bool fullscreen): if (window) { if (fullscreen) { wasfullscreen = SDL_TRUE; SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP); } else if (!fullscreen && wasfullscreen) { wasfullscreen = SDL_FALSE; SDL_SetWindowFullscreen(window, 0); SDL_SetWindowSize(window, width, height); SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED_DISPLAY(1), SDL_WINDOWPOS_CENTERED_DISPLAY(1)); } else if (!wasfullscreen) { // Reposition window only in windowed mode SDL_SetWindowSize(window, width, height); SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED_DISPLAY(1), SDL_WINDOWPOS_CENTERED_DISPLAY(1)); } } else { Impl_CreateWindow(fullscreen); Impl_SetWindowIcon(); wasfullscreen = fullscreen; SDL_SetWindowSize(window, width, height); if (fullscreen) { SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP); } }
Who build the SRB2Mac, was it with the old SDL 1.2 interface or the new SDL 2.0 code
- Maintainer
if you run the binary via terminal, you should see a string like so:
Compiled for SDL version: 2.0.5 Linked with SDL version: 2.0.5
- Maintainer
ok, remove the SDL_SetWindowPosition lines fixes it for me on Linux/GNU, how about on your end?
- Contributor
Actually, I don't think any changes were made in the code at all regarding this issue, afaik
- Contributor
Hm, wonder if it should be just "SDL_WINDOWPOS_CENTERED", going by documentation for SDL_SetWindowPosition? (https://wiki.libsdl.org/SDL_SetWindowPosition)
(Funnily enough SDL_WINDOWPOS_CENTERED is defined to be SDL_WINDOWPOS_CENTERED_DISPLAY(0) anyway so I'm aware; no idea what effect having 1 instead of 0 is having for the _DISPLAY thing)
EDIT: Ah, the _DISPLAY thing takes a "displayindex" to affect as an argument so I take it
- SteelT mentioned in merge request !210 (merged)
mentioned in merge request !210 (merged)
- Alam Ed Arias closed via merge request !210 (merged)
closed via merge request !210 (merged)