mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-01-12 02:19:31 +08:00
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
|
#endif
|
||||||
int main() {
|
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
|
//Set appid to: LOBBY_CONNECT_APPID
|
||||||
SteamAPI_RestartAppIfNecessary(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;
|
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
|
#else
|
||||||
std::cout << "Please launch the game with these arguments: " << connect << std::endl;
|
std::cout << "Please launch the game with these arguments: " << connect << std::endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user