Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only allow main loop to be controlled by platform, and remove some build options #1331

Merged
merged 4 commits into from
Jan 12, 2025

Conversation

joshua-holmes
Copy link
Contributor

@joshua-holmes joshua-holmes commented Jan 3, 2025

Mainly makes these changes:

  • Remove support_non_blocking option because main loop will always be controlled by platform now

  • Remove core_platform build option, since using -Dtarget= is the preferred method of selecting a build target

  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.

@joshua-holmes joshua-holmes changed the title Remove option to support non-blocking and only allow main loop to be controlled by platform Only allow main loop to be controlled by platform, and remove some build options Jan 3, 2025
@@ -58,12 +58,20 @@ backend: Backend,
const MISSING_FEATURES_X11 = [_][]const u8{ "Resizing window", "Changing display mode", "VSync", "Setting window border/cursor" };
const MISSING_FEATURES_WAYLAND = [_][]const u8{ "Resizing window", "Changing display mode", "VSync", "Setting window border/cursor" };

pub fn run(comptime on_each_update_fn: anytype, args_tuple: std.meta.ArgsTuple(@TypeOf(on_each_update_fn))) void {
while (@call(.auto, on_each_update_fn, args_tuple) catch false) {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catch false here is sus, need to investigate better error handling for init of platforms

@@ -33,6 +33,10 @@ pub const Context = struct {
window_id: mach.ObjectID,
};

pub fn run(comptime on_each_update_fn: anytype, args_tuple: std.meta.ArgsTuple(@TypeOf(on_each_update_fn))) void {
while (@call(.auto, on_each_update_fn, args_tuple) catch false) {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@emidoots emidoots merged commit db18684 into hexops:main Jan 12, 2025
1 of 3 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.

2 participants