Commit 569f19c3 authored by Daniel Amm's avatar Daniel Amm Committed by Jean-Baptiste Kempf

win32: add audio events for updating audio button/slider

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 37db61d3
......@@ -423,6 +423,20 @@ void VLCControlsWnd::RegisterToVLCEvents()
PostMessage(hPlayPauseButton, BM_SETIMAGE, (WPARAM) IMAGE_BITMAP, (LPARAM) RC().hPlayBitmap);
PostMessage(hVideoPosScroll, (UINT) PBM_SETPOS, (WPARAM)0, 0);
});
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(2, 2, 2, 0)
VP()->get_mp().eventManager().onAudioVolume([this](float vol) {
UpdateVolumeSlider( roundf(vol * 100) );
});
VP()->get_mp().eventManager().onMuted([this] {
UpdateMuteButton(true);
});
VP()->get_mp().eventManager().onUnmuted([this] {
UpdateMuteButton(false);
});
#endif
}
void VLCControlsWnd::NeedShowControls()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment