move screen resize to a renderer mailbox message

This commit is contained in:
Mitchell Hashimoto
2022-11-17 13:55:04 -08:00
parent fc18be5d32
commit 4521efb83d
7 changed files with 26 additions and 45 deletions

View File

@@ -2,6 +2,7 @@ const std = @import("std");
const assert = std.debug.assert;
const Allocator = std.mem.Allocator;
const font = @import("../font/main.zig");
const renderer = @import("../renderer.zig");
/// The messages that can be sent to a renderer thread.
pub const Message = union(enum) {
@@ -18,4 +19,7 @@ pub const Message = union(enum) {
/// send a grid size change message back to the window thread if
/// the size changes.
font_size: font.face.DesiredSize,
/// Change the screen size.
screen_size: renderer.ScreenSize,
};