Skip to content

Common initialiseGLWithSize method - #719

Merged
mcarans merged 7 commits into
OoliteProject:masterfrom
mcarans:common_iniitalisegl
Aug 20, 2026
Merged

Common initialiseGLWithSize method #719
mcarans merged 7 commits into
OoliteProject:masterfrom
mcarans:common_iniitalisegl

Conversation

@mcarans

@mcarans mcarans commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Remove Windows custom logic
Add one hack for Windows SDL3 pause issue: libsdl-org/SDL#12791 that occurs on some systems eg. when going fullscreen -> window or vice versa
Remove dead code

@phkb Should be almost the same as what you tested but I had to change order of calls for Linux to work

	SDL_SetWindowFullscreen(window, fullScreen);
	if (!fullScreen)
	{
		SDL_SetWindowSize(window, viewSize.width, viewSize.height);
		SDL_SetWindowBordered(window, v_mode);
	}
#if OOLITE_WINDOWS
	else  // Hack for Windows SDL3 pause issue: https://github.com/libsdl-org/SDL/issues/12791
	{     // Occurs on some systems eg. when going fullscreen -> window or vice versa
		LONG currentWindowStyle = GetWindowLong(windowHandle, GWL_STYLE);
		currentWindowStyle &= ~WS_POPUP;
		SetWindowLong(windowHandle, GWL_STYLE, currentWindowStyle);
	}
#endif

Occurs on some systems eg. when going fullscreen -> window or vice versa
Remove uncalled code
Occurs on some systems eg. when going fullscreen -> window or vice versa
Remove uncalled code
Occurs on some systems eg. when going fullscreen -> window or vice versa
Remove uncalled code
@phkb

phkb commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Works well from my end.

@mcarans

mcarans commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

@LW-archlinux please can you check it works for you

@LW-archlinux

LW-archlinux commented Aug 20, 2026

Copy link
Copy Markdown

Nothing weird noticed with this applied to master.

@mcarans
mcarans merged commit 34646fb into OoliteProject:master Aug 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants