mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-10-30 07:11:05 +00:00
media_win32: catch WinRT exceptions for PlaybackStatus()
This commit is contained in:
parent
b6de286057
commit
f694b0d219
1 changed files with 9 additions and 1 deletions
|
|
@ -68,5 +68,13 @@ bool os::media::detail::IsExternalMediaPlaying()
|
||||||
if (!playbackInfo)
|
if (!playbackInfo)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return playbackInfo.PlaybackStatus() == GlobalSystemMediaTransportControlsSessionPlaybackStatus::Playing;
|
try
|
||||||
|
{
|
||||||
|
return playbackInfo.PlaybackStatus() == GlobalSystemMediaTransportControlsSessionPlaybackStatus::Playing;
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
printf("[*] Failed to retrieve GSMTC playback status: 0x%08X\n", to_hresult().value);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue