Fix keyboard service button

This commit is contained in:
akiroz 2022-03-19 03:08:06 +08:00
parent b8f1f6ea73
commit 7e2c0086ae
No known key found for this signature in database
GPG Key ID: 8A5957C4A2F68ACC

View File

@ -238,7 +238,7 @@ export fn chuni_io_jvs_poll(opbtn: ?[*]u8, beams: ?[*]u8) void {
if(cfg.?.chusan == 1 and builtin.cpu.arch != .x86_64) return;
if(opbtn == null or beams == null) return;
if(GetAsyncKeyState(cfg.?.test_key) != 0 or (usb_in.?[3] & (1 << 7)) != 0) opbtn.?.* |= (1 << 0);
if(GetAsyncKeyState(cfg.?.test_key) != 0 or (usb_in.?[3] & (1 << 6)) != 0) opbtn.?.* |= (1 << 1);
if(GetAsyncKeyState(cfg.?.serv_key) != 0 or (usb_in.?[3] & (1 << 6)) != 0) opbtn.?.* |= (1 << 1);
beams.?.* |= usb_in.?[3] & 0b111111;
}