Skip to content

Commit 8dad627

Browse files
committed
Don't let the music be muted when the window position changes.
1 parent 5d23a98 commit 8dad627

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/d2dx/RenderContext.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -817,23 +817,25 @@ static LRESULT CALLBACK d2dxSubclassWndProc(
817817
{
818818
case SIZE_MINIMIZED:
819819
if (GAME_APP_ACTIVE && !APP_ACTIVE) {
820-
DefSubclassProc(hWnd, WM_ACTIVATEAPP, FALSE, 0);
820+
DefSubclassProc(hWnd, WM_ACTIVATEAPP, FALSE, 0);
821821
GAME_APP_ACTIVE = false;
822822
}
823823
break;
824824

825825
case SIZE_RESTORED:
826826
if (!GAME_APP_ACTIVE && APP_ACTIVE) {
827-
DefSubclassProc(hWnd, WM_ACTIVATEAPP, TRUE, 0);
827+
DefSubclassProc(hWnd, WM_ACTIVATEAPP, TRUE, 0);
828828
GAME_APP_ACTIVE = true;
829829
}
830830
break;
831831
}
832832
break;
833-
833+
834834
case WM_WINDOWPOSCHANGED:
835835
renderContext->ClipCursor(true);
836-
break;
836+
837+
// The music is muted if the game recieves this for some reason.
838+
return 0;
837839

838840
case WM_ENTERSIZEMOVE:
839841
renderContext->UnclipCursor();

0 commit comments

Comments
 (0)