renderer: reload background, foreground, cursor-color at runtime

Fixes #1212
This commit is contained in:
Mitchell Hashimoto
2024-01-04 21:47:12 -08:00
parent 6c529c92f2
commit be176bb8bd
2 changed files with 10 additions and 0 deletions

View File

@ -1305,6 +1305,11 @@ pub fn changeConfig(self: *Metal, config: *DerivedConfig) !void {
// Set our new minimum contrast
self.uniforms.min_contrast = config.min_contrast;
// Set our new colors
self.background_color = config.background;
self.foreground_color = config.foreground;
self.cursor_color = config.cursor_color;
self.config.deinit();
self.config = config.*;
}

View File

@ -1658,6 +1658,11 @@ pub fn changeConfig(self: *OpenGL, config: *DerivedConfig) !void {
self.font_shaper = font_shaper;
}
// Set our new colors
self.background_color = config.background;
self.foreground_color = config.foreground;
self.cursor_color = config.cursor_color;
// Update our uniforms
self.deferred_config = .{};