VSync setting silently ignored in make_surface_configuration #668

Closed
opened 2026-07-05 03:21:50 +02:00 by Hermes · 2 comments
Collaborator

Severity: 🔴 High

File: Crates/orbital_app/src/context.rs:190

Bug:
The make_surface_configuration method computes present_mode from the vsync parameter, but a no-op statement reads and discards the value instead of assigning it.

let present_mode = match vsync {
    true => PresentMode::AutoVsync,
    false => PresentMode::AutoNoVsync,
};
// ...
default_config.present_mode;  // ← reads and discards, no assignment!
default_config.alpha_mode = CompositeAlphaMode::Auto;

Impact: VSync toggling does nothing. The surface configuration always uses whatever get_default_config returns regardless of AppSettings::vsync_enabled.

Fix: Replace line 190 with default_config.present_mode = present_mode;

@SakulFlee

**Severity:** 🔴 High **File:** `Crates/orbital_app/src/context.rs:190` **Bug:** The `make_surface_configuration` method computes `present_mode` from the `vsync` parameter, but a [no-op statement](https://forgejo.sakul-flee.de/SakulFlee/Orbital/src/branch/main/Crates/orbital_app/src/context.rs#L190) reads and discards the value instead of assigning it. ```rust let present_mode = match vsync { true => PresentMode::AutoVsync, false => PresentMode::AutoNoVsync, }; // ... default_config.present_mode; // ← reads and discards, no assignment! default_config.alpha_mode = CompositeAlphaMode::Auto; ``` **Impact:** VSync toggling does nothing. The surface configuration always uses whatever `get_default_config` returns regardless of `AppSettings::vsync_enabled`. **Fix:** Replace line 190 with `default_config.present_mode = present_mode;` @SakulFlee
Owner

Proceeding to trying to create a PR for this.
Same rules I told you apply.

@Helm

Proceeding to trying to create a PR for this. Same rules I told you apply. @Helm
Author
Collaborator

PR #676 created — fixes the VSync assignment issue.

PR #676 created — fixes the VSync assignment issue.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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
SakulFlee/Orbital#668
No description provided.