From 7ea7e638bdc3455a3f46274d9206bbd8bb3e6ef4 Mon Sep 17 00:00:00 2001 From: Tom Pratt Date: Sat, 2 May 2026 15:21:44 +0200 Subject: [PATCH] Implement OnMsgPowerButton --- Source/Android/jni/NetPlay/NetPlayUICallbacks.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/Android/jni/NetPlay/NetPlayUICallbacks.cpp b/Source/Android/jni/NetPlay/NetPlayUICallbacks.cpp index 018d5556dd..2ea0b814a7 100644 --- a/Source/Android/jni/NetPlay/NetPlayUICallbacks.cpp +++ b/Source/Android/jni/NetPlay/NetPlayUICallbacks.cpp @@ -2,9 +2,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include "UICommon/GameFile.h" +#include "UICommon/UICommon.h" #include "NetPlayUICallbacks.h" #include "Core/Boot/Boot.h" #include "Core/Core.h" +#include "Core/System.h" #include "jni/AndroidCommon/AndroidCommon.h" #include "jni/AndroidCommon/IDCache.h" @@ -169,7 +171,13 @@ void NetPlayUICallbacks::OnMsgStartGame() } void NetPlayUICallbacks::OnMsgStopGame() {} -void NetPlayUICallbacks::OnMsgPowerButton() {} + +void NetPlayUICallbacks::OnMsgPowerButton() +{ + if (Core::IsRunning(Core::System::GetInstance())) + UICommon::TriggerSTMPowerEvent(); +} + void NetPlayUICallbacks::OnPlayerConnect(const std::string&) {} void NetPlayUICallbacks::OnPlayerDisconnect(const std::string&) {}