Game pauses when a controller is disconnected. Release Build 8395.

This commit is contained in:
sigonasr2 2024-03-25 06:40:19 -05:00
parent b4c9b29be4
commit 81d6e103cc
4 changed files with 4 additions and 4 deletions

View File

@ -190,7 +190,9 @@ void Input::LoadSteamButtonIcons(){
void Input::UpdateSteamInput(){ void Input::UpdateSteamInput(){
if(SteamInput()){ if(SteamInput()){
uint8_t prevControllerCount=controllerCount;
controllerCount=SteamInput()->GetConnectedControllers(steamControllers.data()); controllerCount=SteamInput()->GetConnectedControllers(steamControllers.data());
if(controllerCount<prevControllerCount&&Menu::stack.size()==0&&GameState::STATE==GameState::states[States::GAME_RUN])Menu::OpenMenu(MenuType::PAUSE); //We unplugged a controller so we will automatically pause the game.
for(int i=0;i<controllerCount;i++){ for(int i=0;i<controllerCount;i++){
for(auto&[input,data]:enumToActionName[i]){ for(auto&[input,data]:enumToActionName[i]){
HWButton prevState=data.second; HWButton prevState=data.second;

View File

@ -16,8 +16,6 @@ Steam Rich Presence
Add in vsync system option Add in vsync system option
Remove Unlock All Button Remove Unlock All Button
Start your game in fullscreen by default when the user is running Steam Big Picture (the "SteamTenfoot" environment variable will be set)
Sword attack should linger Sword attack should linger
Add game file debug logging Add game file debug logging
@ -25,6 +23,6 @@ Automatically pause if controller is disconnected (while using a controller)
PS5 LED color support PS5 LED color support
============================================
Make another actions config file for the main build (The app # is different) Make another actions config file for the main build (The app # is different)

View File

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1 #define VERSION_MAJOR 1
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_PATCH 0 #define VERSION_PATCH 0
#define VERSION_BUILD 8394 #define VERSION_BUILD 8395
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a