gamemode: revert commit 41ddd22 for gamemode.zig #1332

Merged
holmes-software merged 2 commits from fix-gamemode-error into main 2025-01-12 16:10:25 +00:00
holmes-software commented 2025-01-03 08:58:09 +00:00 (Migrated from github.com)

Revert changes of 41ddd22 so std.DynLib.open is used to load dyn libs instead of mach.dynLibOpen because we want to silently fail. Also improve logging if both x11 and wayland fail:
image

  • 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.
Revert changes of 41ddd22 so `std.DynLib.open` is used to load dyn libs instead of `mach.dynLibOpen` because we want to silently fail. Also improve logging if both x11 and wayland fail: ![image](https://github.com/user-attachments/assets/b36646b2-0c94-4ae1-b9e8-978f998d8578) - [x] 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.
emidoots (Migrated from github.com) reviewed 2025-01-12 16:08:29 +00:00
emidoots (Migrated from github.com) commented 2025-01-12 16:08:29 +00:00

nit: I always prefer removing zigfmt directives

nit: I always prefer removing zigfmt directives
emidoots (Migrated from github.com) approved these changes 2025-01-12 16:09:00 +00:00
emidoots (Migrated from github.com) reviewed 2025-01-12 16:10:09 +00:00
@ -111,0 +121,4 @@
try libs.appendSlice("\t* " ++ X11.LibGL.lib_name ++ "\n");
}
log.err("The following X11 libraries were not available:\n{s}", .{libs.items});
return e;
emidoots (Migrated from github.com) commented 2025-01-12 16:10:09 +00:00

I think there's a way to write this without the ArrayList, but haven't thought about it too much. A log API that prints partial text instead of a full message? Or printing multiple log lines?

I think there's a way to write this without the ArrayList, but haven't thought about it too much. A `log` API that prints partial text instead of a full message? Or printing multiple log lines?
holmes-software (Migrated from github.com) reviewed 2025-01-15 15:34:28 +00:00
@ -111,0 +121,4 @@
try libs.appendSlice("\t* " ++ X11.LibGL.lib_name ++ "\n");
}
log.err("The following X11 libraries were not available:\n{s}", .{libs.items});
return e;
holmes-software (Migrated from github.com) commented 2025-01-15 15:34:27 +00:00

Yeah I tried printing multiple log lines but it looked so ugly. I'll revisit this and think of another solution.

Yeah I tried printing multiple log lines but it looked so ugly. I'll revisit this and think of another solution.
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
hexops/mach!1332
No description provided.