fix(touch): show the joystick and skill buttons only in the game phase

The controls keyed off CPythonBackground's warp map name, which the
loading window sets before the game window exists, so the loading screen
already showed them. Also require CPythonNetworkStream's phase to be
"Game" (PORT_IsGamePhase, exposed as PythonBoot::InGamePhase).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-30 17:33:46 +09:00
co-authored by Claude Opus 5.5
parent 5c8d583b31
commit f9be09d2c2
5 changed files with 16 additions and 1 deletions
+1 -1
View File
@@ -588,7 +588,7 @@ public:
private:
bool gameplay_controls_visible() const {
#ifdef MT_NATIVE_HAS_LIVE_CLIENT
return !PythonBoot::CurrentMapName().empty();
return PythonBoot::InGamePhase() && !PythonBoot::CurrentMapName().empty();
#else
return false;
#endif