Add check to ensure steam is running before attempting to use the Steam API. Release Build 8221.

This commit is contained in:
sigonasr2 2024-03-22 00:46:21 -05:00
parent 03ac0be3f3
commit 8768b89f38
3 changed files with 7 additions and 5 deletions

View File

@ -327,10 +327,12 @@ bool AiL::OnUserCreate(){
}else{ }else{
std::cout<<"Steam API failed to initialize!"<<std::endl; std::cout<<"Steam API failed to initialize!"<<std::endl;
} }
if(SteamAPI_IsSteamRunning()){
SteamUtils()->SetWarningMessageHook([](int severity,const char*message){ SteamUtils()->SetWarningMessageHook([](int severity,const char*message){
std::cout<<std::format("STEAM[{}]: {}",severity,std::string(message))<<std::endl; std::cout<<std::format("STEAM[{}]: {}",severity,std::string(message))<<std::endl;
}); });
SteamInput()->Init(false); SteamInput()->Init(false);
}
#endif #endif
gameInitialized=true; gameInitialized=true;

View File

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