From 0f6ef723bfefc4de61b05d896767b9dbb30953d3 Mon Sep 17 00:00:00 2001 From: feos Date: Wed, 2 Dec 2015 20:15:12 +0300 Subject: [PATCH] tastudio: fix bug with ScreenshotPopupControl's alpha channel. it was forgetting to discard alpha, and when creating a bitmap it dropped anything but lua hud, since it does have alpha bits that nothing else has, and with no lua hud involved, it showed all normally, since it didn't have to drop colors with zero alpha. lol. --- BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs | 4 +--- .../tools/TAStudio/ScreenshotPopupControl.cs | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs index 6c11b03a7f..cfe97bbfba 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/MarkerControl.cs @@ -189,7 +189,7 @@ namespace BizHawk.Client.EmuHawk } } - public bool EditMarkerPopUp(TasMovieMarker marker) + public void EditMarkerPopUp(TasMovieMarker marker) { var markerFrame = marker.Frame; InputPrompt i = new InputPrompt @@ -209,9 +209,7 @@ namespace BizHawk.Client.EmuHawk { marker.Message = i.PromptText; UpdateValues(); - return true; } - return false; } public void UpdateValues() diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.cs index 10310b0f39..877da461a3 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/ScreenshotPopupControl.cs @@ -19,7 +19,7 @@ namespace BizHawk.Client.EmuHawk public ScreenshotPopupControl() { - SetStyle(ControlStyles.SupportsTransparentBackColor, true); + //SetStyle(ControlStyles.SupportsTransparentBackColor, true); //SetStyle(ControlStyles.Opaque, true); //this.BackColor = Color.Transparent; @@ -28,6 +28,7 @@ namespace BizHawk.Client.EmuHawk protected override void OnPaint(PaintEventArgs e) { + Branch.OSDFrameBuffer.DiscardAlpha(); var bitmap = Branch.OSDFrameBuffer.ToSysdrawingBitmap(); e.Graphics.DrawImage(bitmap, new Rectangle(0, 0, Width, DrawingHeight)); if (UserPadding > 0)