mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-30 14:25:36 +08:00
Merge pull request #244 from otavepto/correct-ownership
Fix conditions for App/DLCs ownership APIs
This commit is contained in:
commit
a681d04c76
@ -5,15 +5,15 @@
|
|||||||
// they're not really accurate
|
// they're not really accurate
|
||||||
const std::map<uint32, std::string> steam_preowned_app_ids = {
|
const std::map<uint32, std::string> steam_preowned_app_ids = {
|
||||||
|
|
||||||
{ 0, "Base Goldsource Shared Binaries" },
|
// { 0, "Base Goldsource Shared Binaries" },
|
||||||
{ 1, "Base Goldsource Shared Content" },
|
// { 1, "Base Goldsource Shared Content" },
|
||||||
{ 2, "Base Goldsource Shared Content Localized (deprecated)" },
|
// { 2, "Base Goldsource Shared Content Localized (deprecated)" },
|
||||||
{ 3, "Original Platform" },
|
// { 3, "Original Platform" },
|
||||||
{ 4, "Half-Life Dedicated Server Linux Deprecated" },
|
{ 4, "Half-Life Dedicated Server Linux Deprecated" },
|
||||||
{ 5, "Half-Life Dedicated Server Windows Deprecated" },
|
{ 5, "Half-Life Dedicated Server Windows Deprecated" },
|
||||||
{ 6, "Base Goldsource Low Violence" },
|
// { 6, "Base Goldsource Low Violence" },
|
||||||
{ 7, "WinUI (Steam v3 user interface)" },
|
// { 7, "WinUI (Steam v3 user interface)" },
|
||||||
{ 8, "WinUI2 (Steam community interface; deprecated)" },
|
// { 8, "WinUI2 (Steam community interface; deprecated)" },
|
||||||
{ 10, "Counter-Strike" },
|
{ 10, "Counter-Strike" },
|
||||||
{ 11, "Counter-Strike Base Content" },
|
{ 11, "Counter-Strike Base Content" },
|
||||||
{ 12, "Counter-Strike French" },
|
{ 12, "Counter-Strike French" },
|
||||||
@ -106,20 +106,18 @@ const std::map<uint32, std::string> steam_preowned_app_ids = {
|
|||||||
{ 130, "Half-Life: Blue Shift" },
|
{ 130, "Half-Life: Blue Shift" },
|
||||||
{ 131, "Half-Life: Blue Shift French" },
|
{ 131, "Half-Life: Blue Shift French" },
|
||||||
{ 132, "Half-Life: Blue Shift German" },
|
{ 132, "Half-Life: Blue Shift German" },
|
||||||
{ 200, "Base Source Shared" },
|
// { 200, "Base Source Shared" },
|
||||||
{ 201, "Source Engine 64bit (for x86_64/AMD64 CPU/OS, deprecated)" },
|
// { 201, "Source Engine 64bit (for x86_64/AMD64 CPU/OS, deprecated)" },
|
||||||
{ 202, "Source Init (VAC)" },
|
// { 202, "Source Init (VAC)" },
|
||||||
{ 203, "Source Shared Securom" },
|
// { 203, "Source Shared Securom" },
|
||||||
{ 204, "Source Dedicated Server Linux (2006)" },
|
// { 204, "Source Dedicated Server Linux (2006)" },
|
||||||
{ 205, "Source Dedicated Server" },
|
{ 205, "Source Dedicated Server" },
|
||||||
{ 205, "Source SDK Base 2006 MP Dedicated Server" },
|
// { 206, "Base Source Shared Materials" },
|
||||||
{ 205, "Source SDK Base 2006 dedicated server (Bug: Linux files are missing.)" },
|
// { 207, "Base Source Shared Models" },
|
||||||
{ 206, "Base Source Shared Materials" },
|
// { 208, "Base Source Shared Sounds" },
|
||||||
{ 207, "Base Source Shared Models" },
|
// { 209, "Source Low Violence" },
|
||||||
{ 208, "Base Source Shared Sounds" },
|
|
||||||
{ 209, "Source Low Violence" },
|
|
||||||
{ 211, "Source SDK" },
|
{ 211, "Source SDK" },
|
||||||
{ 212, "Base Source Engine 2" },
|
// { 212, "Base Source Engine 2" },
|
||||||
{ 213, "Half-Life 2: Episode One Shared" },
|
{ 213, "Half-Life 2: Episode One Shared" },
|
||||||
{ 215, "Source SDK Base 2006 (Episode One)" },
|
{ 215, "Source SDK Base 2006 (Episode One)" },
|
||||||
{ 216, "Source 2007 Binaries" },
|
{ 216, "Source 2007 Binaries" },
|
||||||
|
@ -82,9 +82,9 @@ bool Steam_Apps::BIsSubscribedApp( AppId_t appID )
|
|||||||
{
|
{
|
||||||
PRINT_DEBUG("%u", appID);
|
PRINT_DEBUG("%u", appID);
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
if (appID == 0) return true; //I think appid 0 is always owned
|
if (appID == 0) return false; // steam returns false
|
||||||
if (appID == UINT32_MAX) return false; // check Steam_Apps::BIsAppInstalled()
|
if (appID == UINT32_MAX) return true; // steam returns true
|
||||||
if (appID == settings->get_local_game_id().AppID()) return true;
|
if (appID == settings->get_local_game_id().AppID()) return true; // steam returns true
|
||||||
return settings->hasDLC(appID);
|
return settings->hasDLC(appID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,12 +94,12 @@ bool Steam_Apps::BIsDlcInstalled( AppId_t appID )
|
|||||||
{
|
{
|
||||||
PRINT_DEBUG("%u", appID);
|
PRINT_DEBUG("%u", appID);
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
if (appID == 0) return true;
|
if (appID == 0) return false; // steam returns false (also appid 1958220 expects false otherwise it hangs in loading screen)
|
||||||
if (appID == UINT32_MAX) return false; // check Steam_Apps::BIsAppInstalled()
|
if (appID == UINT32_MAX) return false; // steam returns false
|
||||||
|
|
||||||
// Age of Empires 2: Definitive Edition expects the app itself to be an owned DLC.
|
// Age of Empires 2: Definitive Edition expects the app itself to be an owned DLC.
|
||||||
// otherwise it will only load the "Return of Rome" game mode, also most options are disabled
|
// otherwise it will only load the "Return of Rome" game mode, also most options are disabled
|
||||||
if (appID == settings->get_local_game_id().AppID()) return true;
|
if (appID == settings->get_local_game_id().AppID()) return true; // steam returns true
|
||||||
|
|
||||||
return settings->hasDLC(appID);
|
return settings->hasDLC(appID);
|
||||||
}
|
}
|
||||||
@ -110,8 +110,8 @@ uint32 Steam_Apps::GetEarliestPurchaseUnixTime( AppId_t nAppID )
|
|||||||
{
|
{
|
||||||
PRINT_DEBUG_ENTRY();
|
PRINT_DEBUG_ENTRY();
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
if (nAppID == 0) return 0; //TODO is this correct?
|
if (nAppID == 0) return 0; // steam returns 0
|
||||||
if (nAppID == UINT32_MAX) return 0; // check Steam_Apps::BIsAppInstalled() TODO is this correct?
|
if (nAppID == UINT32_MAX) return 0; // steam returns 0
|
||||||
if (nAppID == settings->get_local_game_id().AppID() || settings->hasDLC(nAppID)) {
|
if (nAppID == settings->get_local_game_id().AppID() || settings->hasDLC(nAppID)) {
|
||||||
auto t =
|
auto t =
|
||||||
// 4 days ago
|
// 4 days ago
|
||||||
@ -319,12 +319,10 @@ bool Steam_Apps::BIsAppInstalled( AppId_t appID )
|
|||||||
PRINT_DEBUG("%u", appID);
|
PRINT_DEBUG("%u", appID);
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
|
|
||||||
// "0 Base Goldsource Shared Binaries"
|
if (appID == 0) return false; // steam returns false
|
||||||
// https://developer.valvesoftware.com/wiki/Steam_Application_IDs
|
|
||||||
if (appID == 0) return true;
|
|
||||||
// game LEGO 2K Drive (app id 1451810) checks for a proper steam behavior by sending uint32_max and expects false in return
|
// game LEGO 2K Drive (app id 1451810) checks for a proper steam behavior by sending uint32_max and expects false in return
|
||||||
if (appID == UINT32_MAX) return false;
|
if (appID == UINT32_MAX) return false; // steam returns false
|
||||||
if (appID == settings->get_local_game_id().AppID()) return true;
|
if (appID == settings->get_local_game_id().AppID()) return true; // steam returns true
|
||||||
|
|
||||||
// TODO is this correct?
|
// TODO is this correct?
|
||||||
// the docs say that this function won't work on DLCs, but HITMAN 3 uses it on every DLC
|
// the docs say that this function won't work on DLCs, but HITMAN 3 uses it on every DLC
|
||||||
|
@ -265,7 +265,7 @@ bool Steam_Remote_Storage::FileWriteStreamCancel( UGCFileWriteStreamHandle_t wri
|
|||||||
// file information
|
// file information
|
||||||
bool Steam_Remote_Storage::FileExists( const char *pchFile )
|
bool Steam_Remote_Storage::FileExists( const char *pchFile )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("%s", pchFile);
|
PRINT_DEBUG("'%s'", pchFile);
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
if (!pchFile || !pchFile[0]) return false;
|
if (!pchFile || !pchFile[0]) return false;
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ bool Steam_Remote_Storage::FileExists( const char *pchFile )
|
|||||||
|
|
||||||
bool Steam_Remote_Storage::FilePersisted( const char *pchFile )
|
bool Steam_Remote_Storage::FilePersisted( const char *pchFile )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG_ENTRY();
|
PRINT_DEBUG("'%s'", pchFile);
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
if (!pchFile || !pchFile[0]) return false;
|
if (!pchFile || !pchFile[0]) return false;
|
||||||
|
|
||||||
@ -283,7 +283,7 @@ bool Steam_Remote_Storage::FilePersisted( const char *pchFile )
|
|||||||
|
|
||||||
int32 Steam_Remote_Storage::GetFileSize( const char *pchFile )
|
int32 Steam_Remote_Storage::GetFileSize( const char *pchFile )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("%s", pchFile);
|
PRINT_DEBUG("'%s'", pchFile);
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
if (!pchFile || !pchFile[0]) return 0;
|
if (!pchFile || !pchFile[0]) return 0;
|
||||||
|
|
||||||
@ -301,7 +301,7 @@ int64 Steam_Remote_Storage::GetFileTimestamp( const char *pchFile )
|
|||||||
|
|
||||||
ERemoteStoragePlatform Steam_Remote_Storage::GetSyncPlatforms( const char *pchFile )
|
ERemoteStoragePlatform Steam_Remote_Storage::GetSyncPlatforms( const char *pchFile )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG_ENTRY();
|
PRINT_DEBUG("'%s'", pchFile);
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
|
|
||||||
return k_ERemoteStoragePlatformAll;
|
return k_ERemoteStoragePlatformAll;
|
||||||
|
@ -9,6 +9,7 @@ account_name=gse orca
|
|||||||
account_steamid=76561197960287930
|
account_steamid=76561197960287930
|
||||||
# the language reported to the app/game
|
# the language reported to the app/game
|
||||||
# look for the column 'API language code' here: https://partner.steamgames.com/doc/store/localization/languages
|
# look for the column 'API language code' here: https://partner.steamgames.com/doc/store/localization/languages
|
||||||
|
# this must also exist in 'supported_languages.txt', otherwise it will be ignored by the emu
|
||||||
# default=english
|
# default=english
|
||||||
language=english
|
language=english
|
||||||
# report a country IP if the game queries it
|
# report a country IP if the game queries it
|
||||||
|
Loading…
Reference in New Issue
Block a user