[pr-fix][startup] Full screen at the start: the window is placed again once the size of the picture is known #703

Open
untried844 wants to merge 1 commit from untried844/Darner:fullscreen-at-start into post-merge
First-time contributor

What it changes

  • The problem on post-merge: with DARNER_FULLSCREEN=1 the window's place at the start is worked out from its client area before the swap chain is made. The client area still has its frame then, and the system may have cut it to the screen, so the game could come up windowed or misplaced.

  • fullscreen.rs: before the picture's size is known the whole screen is taken. ask_ensure posts a registered message to the window once the swap chain is made.

  • host.rs: on that message the window's own thread makes it borderless if it is not (ensure_borderless), or places it again by the picture's real shape, with the backdrop for bars as before.

How it was tested

  • Tested revision: this commit on post-merge 28a9b42.
  • Commands and results: cargo build --release --locked -p darner on this branch alone: builds.
  • Changes a default: no. It only acts when DARNER_FULLSCREEN is set.
  • How it was checked: with DARNER_FULLSCREEN=1 and DARNER_ASPECT=16:9 the game started in full screen on every start over a night of testing.
  • Checks run on that revision: cargo build. cargo clippy and cargo test not run.
  • Gameplay: Intel Core i9-13900K · 32 GB DDR5-6400 (2 sticks) · NVIDIA GeForce RTX 4090 24 GB, driver 621.40 · Windows 11 Pro build 26300. Series X profile, 2560x1440 output, DLSS Quality (1712x960 render) and DLAA, HDR on, frame generation 2x, hardware ray tracing.
  • Hardware dependence: likely general; one monitor at 2560x1440 tested.
  • Coverage gaps: several monitors, other aspect settings and Alt+Enter after the start were not tried.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
  • This PR contains one change based on post-merge (28a9b42).
  • The diff contains no game files, code or assets.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #689, #668, #663 touch host.rs elsewhere; each merges cleanly with this
  • Replaces or overlaps: none found

The change was written with a coding agent (AI-assisted) and run by me in the game.

## What it changes - The problem on `post-merge`: with `DARNER_FULLSCREEN=1` the window's place at the start is worked out from its client area before the swap chain is made. The client area still has its frame then, and the system may have cut it to the screen, so the game could come up windowed or misplaced. - `fullscreen.rs`: before the picture's size is known the whole screen is taken. `ask_ensure` posts a registered message to the window once the swap chain is made. - `host.rs`: on that message the window's own thread makes it borderless if it is not (`ensure_borderless`), or places it again by the picture's real shape, with the backdrop for bars as before. ## How it was tested - Tested revision: this commit on `post-merge` `28a9b42`. - Commands and results: `cargo build --release --locked -p darner` on this branch alone: builds. - Changes a default: no. It only acts when `DARNER_FULLSCREEN` is set. - How it was checked: with `DARNER_FULLSCREEN=1` and `DARNER_ASPECT=16:9` the game started in full screen on every start over a night of testing. - Checks run on that revision: `cargo build`. `cargo clippy` and `cargo test` not run. - Gameplay: Intel Core i9-13900K · 32 GB DDR5-6400 (2 sticks) · NVIDIA GeForce RTX 4090 24 GB, driver 621.40 · Windows 11 Pro build 26300. Series X profile, 2560x1440 output, DLSS Quality (1712x960 render) and DLAA, HDR on, frame generation 2x, hardware ray tracing. - Hardware dependence: likely general; one monitor at 2560x1440 tested. - Coverage gaps: several monitors, other aspect settings and Alt+Enter after the start were not tried. ## Checklist - [x] I ran this change in the game, or say below why it can't be (docs, tests only). - [x] This PR contains one change based on `post-merge` (`28a9b42`). - [x] The diff contains no game files, code or assets. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #689, #668, #663 touch `host.rs` elsewhere; each merges cleanly with this - Replaces or overlaps: none found The change was written with a coding agent (AI-assisted) and run by me in the game.
With DARNER_FULLSCREEN the window's place was worked out from its client area before the swap chain exists. The client area still has the frame then and may be cut to the screen, so the window could come up windowed or misplaced. The whole screen is taken first, and a message posted when the swap chain is made has the window's own thread make it borderless or place it again by the picture's real shape.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fullscreen-at-start:untried844-fullscreen-at-start'
git switch 'untried844-fullscreen-at-start'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'post-merge'
git merge --no-ff 'untried844-fullscreen-at-start'
git switch 'untried844-fullscreen-at-start'
git rebase 'post-merge'
git switch 'post-merge'
git merge --ff-only 'untried844-fullscreen-at-start'
git switch 'untried844-fullscreen-at-start'
git rebase 'post-merge'
git switch 'post-merge'
git merge --no-ff 'untried844-fullscreen-at-start'
git switch 'post-merge'
git merge --squash 'untried844-fullscreen-at-start'
git switch 'post-merge'
git merge --ff-only 'untried844-fullscreen-at-start'
git switch 'post-merge'
git merge 'untried844-fullscreen-at-start'
git push origin 'post-merge'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!703
No description provided.