mirror of
https://codeberg.org/fairyglade/ly.git
synced 2026-08-22 05:24:24 +02:00
Make setting numlock work on BSD + less homebrew interop
Signed-off-by: AnErrupTion <anerruption@disroot.org>
This commit is contained in:
parent
b1bf89a4cf
commit
3fedb59fdb
4 changed files with 66 additions and 64 deletions
13
src/main.zig
13
src/main.zig
|
|
@ -307,16 +307,9 @@ pub fn main() !void {
|
|||
var auth_fails: u64 = 0;
|
||||
|
||||
// Switch to selected TTY if possible
|
||||
open_console_dev: {
|
||||
const fd = std.posix.open(config.console_dev, .{ .ACCMODE = .WRONLY }, 0) catch {
|
||||
try info_line.addMessage(lang.err_console_dev, config.error_bg, config.error_fg);
|
||||
break :open_console_dev;
|
||||
};
|
||||
defer std.posix.close(fd);
|
||||
|
||||
_ = std.c.ioctl(fd, interop.VT_ACTIVATE, config.tty);
|
||||
_ = std.c.ioctl(fd, interop.VT_WAITACTIVE, config.tty);
|
||||
}
|
||||
interop.switchTty(config.console_dev, config.tty) catch {
|
||||
try info_line.addMessage(lang.err_console_dev, config.error_bg, config.error_fg);
|
||||
};
|
||||
|
||||
while (run) {
|
||||
// If there's no input or there's an animation, a resolution change needs to be checked
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue