Skip to content

Commit

Permalink
minor code cleanup (infer tagged union tag)
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Mar 11, 2025
1 parent f3508cc commit 3d5f58f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/common/glue.zig
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ pub const Dim = struct {
height: i32 = 0,
};

/// emulator framebuffer pixel formats
pub const PixelFormat = enum {
/// pixels are 8-bit palette indices
Palette8,
/// pixels are 32-bit true color
Rgba8,
};

/// display orientation
pub const DisplayOrientation = enum {
Landscape,
Expand All @@ -33,7 +25,7 @@ pub const DisplayInfo = struct {
/// framebuffer dimensions in pixels
dim: Dim,
/// slice to the actual framebuffer pixels
buffer: ?union(PixelFormat) {
buffer: ?union(enum) {
Palette8: []const u8,
Rgba8: []const u32,
},
Expand Down

0 comments on commit 3d5f58f

Please sign in to comment.