diff --git a/desmume/src/frontend/windows/main.cpp b/desmume/src/frontend/windows/main.cpp index c67a8f38c..9f4431001 100755 --- a/desmume/src/frontend/windows/main.cpp +++ b/desmume/src/frontend/windows/main.cpp @@ -2005,18 +2005,21 @@ static void DoDisplay() } } - //apply user's filter - video.filter(); - // draw hud aggDraw.hud->clear(); DoDisplay_DrawHud(); + if (ddhw || ddsw) + { + // DirectDraw doesn't support alpha blending, so we must scale and overlay the HUD ourselves. + T_AGG_RGBA target((u8*)video.buffer, video.prefilterWidth, video.prefilterHeight, video.prefilterWidth * 4); + target.transformImage(aggDraw.hud->image(), 0, 0, video.prefilterWidth, video.prefilterHeight); + } + + //apply user's filter + video.filter(); if(ddhw || ddsw) { - // DirectDraw doesn't support alpha blending, so we must scale and overlay the HUD ourselves. - T_AGG_RGBA target((u8*)video.finalBuffer(), video.width, video.height, video.width * 4); - target.transformImage(aggDraw.hud->image(), 0, 0, video.width, video.height); gldisplay.kill(); DD_DoDisplay(); }