Skip to content

Even further simplify - #726

Merged
mcarans merged 4 commits into
OoliteProject:masterfrom
mcarans:even_further_simplify
Aug 26, 2026
Merged

Even further simplify#726
mcarans merged 4 commits into
OoliteProject:masterfrom
mcarans:even_further_simplify

Conversation

@mcarans

@mcarans mcarans commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

#725 +
move setUpBasicOpenGLStateWithSize from GameController.m to MyOpenGLVIew.m
make common updateGLSize function called by resize and initialiseGLwithSize
Move the related methods to be next to each other in the source for readability

@phkb @LW-archlinux If this works then I won't need to merge 725

@mcarans

mcarans commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

@phkb in addition can you try what's suggested here? https://discourse.libsdl.org/t/how-to-go-fullscreen-in-sdl3-without-ws-popup/69148/4 (ie. remove the Windows hack and instead hide the SDL window, call SDL_SetWindowFullscreen and show the window) then see if you get the 5 second delay when switching between window and fullscreen. Funnily enough this is the trick required to centre the game window after splash on Wayland on Linux.

SDL_HideWindow(window);
SDL_SetWindowFullscreen(window, fullScreen);
SDL_ShowWindow(window);

@mcarans
mcarans marked this pull request as draft August 23, 2026 23:29
@mcarans

mcarans commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

Setting to draft while I investigate failure on master

@phkb

phkb commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

The code in the PR is fine, tested OK, no pauses. However, attempting to remove the hack and do the hide/setWindowFullScreen/show thing still caused delays.

@mcarans

mcarans commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

The code in the PR is fine, tested OK, no pauses. However, attempting to remove the hack and do the hide/setWindowFullScreen/show thing still caused delays.

Thanks for testing. I have reported that hide/show didn't work: https://discourse.libsdl.org/t/how-to-go-fullscreen-in-sdl3-without-ws-popup/69148/5

I will have to rebase this PR assuming the fix I've made helps resolve Linux startup issues (#727)

@mcarans
mcarans force-pushed the even_further_simplify branch from fd6c387 to d4c1ecd Compare August 24, 2026 19:21
@mcarans

mcarans commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@phkb @LW-archlinux I have rebased this with the fix (the revert) merged into master. Please let me know if it works for you.

@mcarans
mcarans marked this pull request as ready for review August 24, 2026 19:26
@mcarans

mcarans commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@oocube I saw you're commenting again. Please can you check this PR works for you. If this works then I won't need to merge 725.

The flatpak failure is that the archive.mesa3d.org site used by a dependency that FlatHub demanded is temporarily down so please ignore for now. Flatpak build working now

@phkb

phkb commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Everything still looks OK from my end.

@oocube

oocube commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@oocube I saw you're commenting again. Please can you check this PR works for you. If this works then I won't need to merge 725.

The flatpak failure is that the archive.mesa3d.org site used by a dependency that FlatHub demanded is temporarily down so please ignore for now. Flatpak build working now

I checked https://github.com/OoliteProject/oolite/actions/runs/32767647793
It has the flatpak artifact only. What happened to the others?

Update: I checked the build logs and found the "Archive installer" step. In the end of the log there is a download url.

@oocube

oocube commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

I downloaded Oolite-1.93.1-PullRequest726.3138-dev-x86_64.AppImage. It runs well - I did not observe any problems. Positioning and resizing is smooth.

For a first time I checked the fullscreen option, and switching it on and off does not cause any delays for me.
I was stunned where the fullscreen window goes, but apparently the game gets fullscreen on the screen it is running on when I turn on fullscreen. Absolutely ok for me.

Then I was wondering about the offered resolutions. I have two full HD screens (1920x1080) and one smaller (1680x1050) as the main screen. Oolite offers only resolutions fit for the smaller monitor, even if it runs on the other one. But it did not feel like this setting has any effect. Should it?

@LW-archlinux

Copy link
Copy Markdown

Both #725 and #726 work fine.

Sidenote:
galcop vipers get destroyed easily by a slow moving iron ass turreted ship .
Their AI doesn't seem to understand they should NOT close in to the target flying in straight line at max speed.

@mcarans

mcarans commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Awesome this is such a good refactor!

@mcarans
mcarans merged commit 37469ed into OoliteProject:master Aug 26, 2026
19 of 20 checks passed
@mcarans

mcarans commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Oolite offers only resolutions fit for the smaller monitor, even if it runs on the other one. But it did not feel like this setting has any effect. Should it?

I'm not sure. I can see if there is an SDL3 thing for that.

@mcarans mcarans mentioned this pull request Aug 26, 2026
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.

4 participants