Skip to content

Commit

Permalink
Add GVGNP adhoc compat hack(without breaking other games)
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaMoo committed Nov 2, 2018
1 parent 466461b commit ab2de48
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Core/Compatibility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
CheckSetting(iniFile, gameID, "DisableAccurateDepth", &flags_.DisableAccurateDepth);
CheckSetting(iniFile, gameID, "MGS2AcidHack", &flags_.MGS2AcidHack);
CheckSetting(iniFile, gameID, "SonicRivalsHack", &flags_.SonicRivalsHack);
CheckSetting(iniFile, gameID, "AdhocHack", &flags_.AdhocHackDisableNBSwitch);
}

void Compatibility::CheckSetting(IniFile &iniFile, const std::string &gameID, const char *option, bool *flag) {
Expand Down
1 change: 1 addition & 0 deletions Core/Compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ struct CompatFlags {
bool DisableAccurateDepth;
bool MGS2AcidHack;
bool SonicRivalsHack;
bool AdhocHackDisableNBSwitch;
};

class IniFile;
Expand Down
2 changes: 1 addition & 1 deletion Core/HLE/sceNetAdhoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,7 @@ static int sceNetAdhocPtpConnect(int id, int timeout, int flag) {
// Grab Nonblocking Flag
uint32_t nbio = getBlockingFlag(socket->id);
// Switch to Nonblocking Behaviour
if (nbio == 0) {
if (nbio == 0 && !PSP_CoreParameter().compat.flags().AdhocHackDisableNBSwitch) {
// Overwrite Socket Option
changeBlockingMode(socket->id, 1);
}
Expand Down
5 changes: 5 additions & 0 deletions assets/compat.ini
Original file line number Diff line number Diff line change
Expand Up @@ -432,3 +432,8 @@ ULES00622 = true # SR1
ULUS10195 = true # SR1
ULUS10323 = true # SR2
ULES00940 = true # SR2

[AdhocHackDisableNBSwitch]
ULJS00250 = true
ULJS19048 = true
NPJH50107 = true

0 comments on commit ab2de48

Please sign in to comment.