mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 23:00:42 +00:00
Fix sound prefs window flickering dark when changing the volume
This commit is contained in:
@@ -727,6 +727,8 @@ void DoSoundPrefs (void)
|
|||||||
short itemHit;
|
short itemHit;
|
||||||
Boolean leaving;
|
Boolean leaving;
|
||||||
|
|
||||||
|
PortabilityLayer::WindowManager *wm = PortabilityLayer::WindowManager::GetInstance();
|
||||||
|
|
||||||
BringUpDialog(&prefDlg, kSoundPrefsDialID, nullptr);
|
BringUpDialog(&prefDlg, kSoundPrefsDialID, nullptr);
|
||||||
|
|
||||||
DrawSurface *surface = prefDlg->GetWindow()->GetDrawSurface();
|
DrawSurface *surface = prefDlg->GetWindow()->GetDrawSurface();
|
||||||
@@ -741,6 +743,9 @@ void DoSoundPrefs (void)
|
|||||||
SetDialogItemValue(prefDlg, kPlayMusicItem, (short)wasPlay);
|
SetDialogItemValue(prefDlg, kPlayMusicItem, (short)wasPlay);
|
||||||
leaving = false;
|
leaving = false;
|
||||||
|
|
||||||
|
Window *exclStack = prefDlg->GetWindow();
|
||||||
|
wm->SwapExclusiveWindow(exclStack); // Push exclusive window
|
||||||
|
|
||||||
while (!leaving)
|
while (!leaving)
|
||||||
{
|
{
|
||||||
itemHit = prefDlg->ExecuteModal(SoundFilter);
|
itemHit = prefDlg->ExecuteModal(SoundFilter);
|
||||||
@@ -844,6 +849,8 @@ void DoSoundPrefs (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wm->SwapExclusiveWindow(exclStack); // Pop exclusive window
|
||||||
|
|
||||||
prefDlg->Destroy();
|
prefDlg->Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user