all: zig fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
0a1ff43ce5
commit
f807c85232
2 changed files with 11 additions and 11 deletions
|
|
@ -572,43 +572,43 @@ pub inline fn internal_load_libgamemode() c_int {
|
||||||
var bindings: [7]struct_binding = [7]struct_binding{
|
var bindings: [7]struct_binding = [7]struct_binding{
|
||||||
struct_binding{
|
struct_binding{
|
||||||
.name = "real_gamemode_request_start",
|
.name = "real_gamemode_request_start",
|
||||||
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_request_start),
|
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_request_start),
|
||||||
.func_size = @sizeOf(api_call_return_int),
|
.func_size = @sizeOf(api_call_return_int),
|
||||||
.required = @as(c_int, 1) != 0,
|
.required = @as(c_int, 1) != 0,
|
||||||
},
|
},
|
||||||
struct_binding{
|
struct_binding{
|
||||||
.name = "real_gamemode_request_end",
|
.name = "real_gamemode_request_end",
|
||||||
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_request_end),
|
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_request_end),
|
||||||
.func_size = @sizeOf(api_call_return_int),
|
.func_size = @sizeOf(api_call_return_int),
|
||||||
.required = @as(c_int, 1) != 0,
|
.required = @as(c_int, 1) != 0,
|
||||||
},
|
},
|
||||||
struct_binding{
|
struct_binding{
|
||||||
.name = "real_gamemode_query_status",
|
.name = "real_gamemode_query_status",
|
||||||
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_query_status),
|
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_query_status),
|
||||||
.func_size = @sizeOf(api_call_return_int),
|
.func_size = @sizeOf(api_call_return_int),
|
||||||
.required = @as(c_int, 0) != 0,
|
.required = @as(c_int, 0) != 0,
|
||||||
},
|
},
|
||||||
struct_binding{
|
struct_binding{
|
||||||
.name = "real_gamemode_error_string",
|
.name = "real_gamemode_error_string",
|
||||||
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_error_string),
|
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_error_string),
|
||||||
.func_size = @sizeOf(api_call_return_cstring),
|
.func_size = @sizeOf(api_call_return_cstring),
|
||||||
.required = @as(c_int, 1) != 0,
|
.required = @as(c_int, 1) != 0,
|
||||||
},
|
},
|
||||||
struct_binding{
|
struct_binding{
|
||||||
.name = "real_gamemode_request_start_for",
|
.name = "real_gamemode_request_start_for",
|
||||||
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_request_start_for),
|
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_request_start_for),
|
||||||
.func_size = @sizeOf(api_call_pid_return_int),
|
.func_size = @sizeOf(api_call_pid_return_int),
|
||||||
.required = @as(c_int, 0) != 0,
|
.required = @as(c_int, 0) != 0,
|
||||||
},
|
},
|
||||||
struct_binding{
|
struct_binding{
|
||||||
.name = "real_gamemode_request_end_for",
|
.name = "real_gamemode_request_end_for",
|
||||||
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_request_end_for),
|
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_request_end_for),
|
||||||
.func_size = @sizeOf(api_call_pid_return_int),
|
.func_size = @sizeOf(api_call_pid_return_int),
|
||||||
.required = @as(c_int, 0) != 0,
|
.required = @as(c_int, 0) != 0,
|
||||||
},
|
},
|
||||||
struct_binding{
|
struct_binding{
|
||||||
.name = "real_gamemode_query_status_for",
|
.name = "real_gamemode_query_status_for",
|
||||||
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_query_status_for),
|
.functor = @ptrCast([*c]?*anyopaque, &REAL_internal_gamemode_query_status_for),
|
||||||
.func_size = @sizeOf(api_call_pid_return_int),
|
.func_size = @sizeOf(api_call_pid_return_int),
|
||||||
.required = @as(c_int, 0) != 0,
|
.required = @as(c_int, 0) != 0,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ test "connect to device" {
|
||||||
const a = try init();
|
const a = try init();
|
||||||
defer a.deinit();
|
defer a.deinit();
|
||||||
|
|
||||||
const d = try a.requestDevice(std.testing.allocator,.{ .mode = .output });
|
const d = try a.requestDevice(std.testing.allocator, .{ .mode = .output });
|
||||||
defer d.deinit(std.testing.allocator);
|
defer d.deinit(std.testing.allocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -90,7 +90,7 @@ test "connect to device from descriptor" {
|
||||||
var iter = a.outputDeviceIterator();
|
var iter = a.outputDeviceIterator();
|
||||||
var device_desc = (try iter.next()) orelse return error.NoDeviceFound;
|
var device_desc = (try iter.next()) orelse return error.NoDeviceFound;
|
||||||
|
|
||||||
const d = try a.requestDevice(std.testing.allocator,device_desc);
|
const d = try a.requestDevice(std.testing.allocator, device_desc);
|
||||||
defer d.deinit(std.testing.allocator);
|
defer d.deinit(std.testing.allocator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,7 +106,7 @@ test "requestDevice behavior: null is_raw" {
|
||||||
.mode = device_desc.mode,
|
.mode = device_desc.mode,
|
||||||
.id = device_desc.id,
|
.id = device_desc.id,
|
||||||
};
|
};
|
||||||
try testing.expectError(error.InvalidParameter, a.requestDevice(std.testing.allocator,bad_desc));
|
try testing.expectError(error.InvalidParameter, a.requestDevice(std.testing.allocator, bad_desc));
|
||||||
}
|
}
|
||||||
|
|
||||||
test "requestDevice behavior: null mode" {
|
test "requestDevice behavior: null mode" {
|
||||||
|
|
@ -121,7 +121,7 @@ test "requestDevice behavior: null mode" {
|
||||||
.mode = null,
|
.mode = null,
|
||||||
.id = device_desc.id,
|
.id = device_desc.id,
|
||||||
};
|
};
|
||||||
try testing.expectError(error.InvalidParameter, a.requestDevice(std.testing.allocator,bad_desc));
|
try testing.expectError(error.InvalidParameter, a.requestDevice(std.testing.allocator, bad_desc));
|
||||||
}
|
}
|
||||||
|
|
||||||
test "requestDevice behavior: invalid id" {
|
test "requestDevice behavior: invalid id" {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue