Skip to content

Bump RemoteOS-SDL for host-chosen desktop size - #2

Merged
jordanhubbard merged 1 commit into
mainfrom
remoteos-sdl-display-size
Sep 22, 2026
Merged

jordanhubbard merged 1 commit into
mainfrom
remoteos-sdl-display-size

Conversation

@jordanhubbard

Copy link
Copy Markdown
Owner

Picks up jordanhubbard/RemoteOS-SDL#1. Submodule pointer only — no PythonOS source changes.

What the bump brings

REMOTEOS_SDL_SIZE=WxH overrides the size a guest requests. A bare-metal guest has no environment and no way to ask what the host's display can do, so it asks for a fixed size and is stuck with it. Nothing in PythonOS has to change to benefit: _open_bridge_window already adopts the reported size into _bridge_w/_bridge_h rather than assuming it got what it asked for.

display.open now always reports the framebuffer that was actually created. This fixes a latent bug on the window-surface fallback — the path PythonOS takes whenever SDL_CreateRenderer fails. SDL_GetWindowSurface returns a surface at the drawable size, so on a high-density display the guest was told a size smaller than the buffer it had been handed, and would paint into one corner of it.

SDL_WINDOW_ALLOW_HIGHDPI + SDL_RenderSetLogicalSize, so the window takes the display's full pixel density while the guest keeps drawing in the coordinates it asked for.

The size override is skipped in headless mode, so test-gui captures and visual goldens keep the dimensions their callers chose.

Testing

The service's own suite passes against this commit, including the headless window-surface path this repo exercises:

RemoteOS protocol-v2 SDL smoke: PASS
RemoteOS 3D (software-depth), FFmpeg decode/encode and synchronized A/V: PASS

Not run here: PythonOS's own test-gui, which needs a full guest build. The guest source is untouched and headless behaviour is unchanged, but a maintainer may want to confirm before merging.

The high-density path is also untested — the development display is 3840×1080 at a 1:1 backing scale, where ALLOW_HIGHDPI is a measured no-op.

🤖 Generated with Claude Code

@jordanhubbard
jordanhubbard force-pushed the remoteos-sdl-display-size branch from b8cf8d0 to 5d2c294 Compare September 21, 2026 23:58
Picks up jordanhubbard/RemoteOS-SDL#1, released as v0.3.0, which lets the
host override the size a guest asks for via REMOTEOS_SDL_SIZE and makes
display.open's reply always describe the framebuffer that was actually
created.

No PythonOS change is needed to benefit: _open_bridge_window already
adopts the reported size into _bridge_w/_bridge_h rather than assuming it
got what it requested, and those feed layout throughout the compositor.
The override is skipped in headless mode, so captures and visual goldens
keep the dimensions their callers chose.

Also fixes a latent bug on the window-surface fallback, which PythonOS
takes whenever renderer creation fails: SDL_GetWindowSurface returns a
surface at the drawable size, so on a high-density display the guest was
told a size smaller than the buffer it had been handed and would have
painted into one corner of it.

Pins the release tag rather than the commit that preceded it, so the
service shipped here is exactly the one 0.3.0 published.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@jordanhubbard
jordanhubbard force-pushed the remoteos-sdl-display-size branch from 5d2c294 to 6b3003a Compare September 22, 2026 04:48
@jordanhubbard
jordanhubbard merged commit b5629b7 into main Sep 22, 2026
7 of 9 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.

1 participant