mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-29 07:16:33 +00:00
WGInput: Work around crash with Steam overlay.
This commit is contained in:
parent
48c9c224cf
commit
67c97a0bf2
1 changed files with 5 additions and 1 deletions
|
@ -544,8 +544,12 @@ private:
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// Workaround for Steam. If Steam's GameOverlayRenderer64.dll is loaded, battery_info is null.
|
||||||
|
auto battery_info = m_raw_controller.try_as<WGI::IGameControllerBatteryInfo>();
|
||||||
|
if (!battery_info)
|
||||||
|
return false;
|
||||||
const winrt::Windows::Devices::Power::BatteryReport report =
|
const winrt::Windows::Devices::Power::BatteryReport report =
|
||||||
m_raw_controller.TryGetBatteryReport();
|
battery_info.TryGetBatteryReport();
|
||||||
if (!report)
|
if (!report)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue