make it claer the config pointer is not stable after renderer/IO init

This commit is contained in:
Mitchell Hashimoto
2023-03-13 21:16:55 -07:00
parent 9b10b5d716
commit 8cb9ee5d59
2 changed files with 6 additions and 2 deletions

View File

@ -5,7 +5,9 @@ const font = @import("../font/main.zig");
const renderer = @import("../renderer.zig");
const Config = @import("../config.zig").Config;
/// The app configuration.
/// The app configuration. This must NOT be stored by any termio implementation.
/// The memory it points to is NOT stable after the init call so any values
/// in here must be copied.
config: *const Config,
/// The font group that should be used.

View File

@ -11,7 +11,9 @@ grid_size: renderer.GridSize,
/// The size of the viewport in pixels.
screen_size: renderer.ScreenSize,
/// The app configuration.
/// The app configuration. This must NOT be stored by any termio implementation.
/// The memory it points to is NOT stable after the init call so any values
/// in here must be copied.
config: *const Config,
/// The render state. The IO implementation can modify anything here. The