Skip to content

Commit

Permalink
Headless fix (#1230)
Browse files Browse the repository at this point in the history
* setting headless mode now properly updates

* Fixed logic for updating headless state (even though unimplemented)
  • Loading branch information
TheHonestHare committed Aug 8, 2024
1 parent ad377be commit 0049f03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/platform/glfw/Core.zig
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ pub fn update(self: *Core, app: anytype) !bool {

// Headless changes
if (self.current_headless != self.last_headless) {
self.current_headless = self.last_headless;
self.last_headless = self.current_headless;
if (self.current_headless) self.window.hide() else self.window.show();
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/platform/x11/Core.zig
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ pub fn update(self: *Core, app: anytype) !bool {

// Headless changes
if (self.current_headless != self.last_headless) {
self.current_headless = self.last_headless;
self.last_headless = self.current_headless;
// if (self.current_headless) self.window.hide() else self.window.show();
}

Expand Down

0 comments on commit 0049f03

Please sign in to comment.