Make lobby_connect work on Linux.

Fix a bug with it not finding rich presence.

Code is all open source now so no need to ship the lobby connect source in the release.
This commit is contained in:
Mr_Goldberg 2019-04-16 17:58:08 -04:00
parent 52cad2114d
commit fb7c8ea35b
No known key found for this signature in database
GPG key ID: 8597D87419DEF278
6 changed files with 39 additions and 19 deletions

View file

@ -43,6 +43,11 @@ class Settings {
std::vector<struct DLC_entry> DLCs;
std::vector<struct Mod_entry> mods;
public:
#ifdef LOBBY_CONNECT
static const bool is_lobby_connect = true;
#else
static const bool is_lobby_connect = false;
#endif
static std::string sanitize(std::string name);
Settings(CSteamID steam_id, CGameID game_id, std::string name, std::string language);
CSteamID get_local_steam_id();

View file

@ -75,10 +75,10 @@ void rich_presence_updated(CSteamID id, AppId_t appid)
callbacks->addCBResult(data.k_iCallback, &data, sizeof(data));
}
bool isSameAppId(Friend *f)
bool isAppIdCompatible(Friend *f)
{
//in my emu 0 appid is the same as any appid, it's useful for things like my lobby connect program
if (!settings->get_local_game_id().AppID()) return true;
if (settings->is_lobby_connect) return true;
if (f == &us) return true;
return settings->get_local_game_id().AppID() == f->appid();
}