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 2a98097336
commit ae6bab6176
3 changed files with 7 additions and 5 deletions

View File

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

View File

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