From 4f69796e517e541a5097e25ea178bda2467e60fd Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Thu, 26 Sep 2024 08:53:04 +1000 Subject: [PATCH] Check for cached `SolidBrush` in `LuaPictureBox.DrawText` --- src/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs index 6e38e6ac61..7a448a2216 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaPictureBox.cs @@ -390,7 +390,7 @@ namespace BizHawk.Client.EmuHawk boxBackground.FillRectangle(GetBrush(TableHelper.SafeParseColor(backColor) ?? _defaultTextBackground.Value), rect); boxBackground = Graphics.FromImage(Image); boxBackground.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit; - boxBackground.DrawString(message, font, new SolidBrush(TableHelper.SafeParseColor(foreColor) ?? Color.Black), x, y); + boxBackground.DrawString(message, font, GetBrush(TableHelper.SafeParseColor(foreColor) ?? Color.Black), x, y); } public Point GetMouse()