refactor lobby_connect code + return! + set appid via env var (not needed but just in case)
This commit is contained in:
parent
3dc17a8bc4
commit
425baa4e2a
@ -34,7 +34,14 @@
|
||||
|
||||
#endif
|
||||
int main() {
|
||||
if (SteamAPI_Init()) {
|
||||
std::string appid_str(std::to_string(LOBBY_CONNECT_APPID));
|
||||
set_env_variable("SteamAppId", appid_str);
|
||||
set_env_variable("SteamGameId", appid_str);
|
||||
|
||||
if (!SteamAPI_Init()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Set appid to: LOBBY_CONNECT_APPID
|
||||
SteamAPI_RestartAppIfNecessary(LOBBY_CONNECT_APPID);
|
||||
std::cout << "This is a program to find lobbies and run the game with lobby connect parameters" << std::endl;
|
||||
@ -161,5 +168,6 @@ top:
|
||||
#else
|
||||
std::cout << "Please launch the game with these arguments: " << connect << std::endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user