mach: use null and undefined in enums

Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
This commit is contained in:
Eric Joldasov 2022-12-13 18:44:04 +06:00 committed by Stephen Gutekanst
parent 37b7d32485
commit e832784e6b
2 changed files with 3 additions and 3 deletions

View file

@ -96,7 +96,7 @@ pub const Platform = struct {
// Print which adapter we are going to use. // Print which adapter we are going to use.
var props: gpu.Adapter.Properties = undefined; var props: gpu.Adapter.Properties = undefined;
response.?.adapter.getProperties(&props); response.?.adapter.getProperties(&props);
if (props.backend_type == .nul) { if (props.backend_type == .null) {
std.log.err("no backend found for {s} adapter", .{props.adapter_type.name()}); std.log.err("no backend found for {s} adapter", .{props.adapter_type.name()});
std.process.exit(1); std.process.exit(1);
} }

View file

@ -52,9 +52,9 @@ pub const Options = struct {
required_limits: ?gpu.Limits = null, required_limits: ?gpu.Limits = null,
/// Whether the application has a preference for low power or high performance GPU. /// Whether the application has a preference for low power or high performance GPU.
power_preference: gpu.PowerPreference = .undef, power_preference: gpu.PowerPreference = .undefined,
/// If set, optimize for regular applications rather than games. e.g. disable Linux gamemode / process priority, prefer low-power GPU (if preference is .undef), etc. /// If set, optimize for regular applications rather than games. e.g. disable Linux gamemode / process priority, prefer low-power GPU (if preference is .undefined), etc.
is_app: bool = false, is_app: bool = false,
}; };