Remove WinAPI primitive types from 4J.Profile

This commit is contained in:
notmatthewbeshay 2026-03-16 04:27:49 +11:00
parent ba4a20531d
commit 73a8cf8f8e
3 changed files with 41 additions and 37 deletions

View file

@ -5,10 +5,12 @@ C_4JProfile ProfileManager;
static void* s_profileData[4] = {};
void C_4JProfile::Initialise(DWORD dwTitleID, DWORD dwOfferID,
void C_4JProfile::Initialise(std::uint32_t dwTitleID,
std::uint32_t dwOfferID,
unsigned short usProfileVersion,
UINT uiProfileValuesC, UINT uiProfileSettingsC,
DWORD* pdwProfileSettingsA,
unsigned int uiProfileValuesC,
unsigned int uiProfileSettingsC,
std::uint32_t* pdwProfileSettingsA,
int iGameDefinedDataSizeX4,
unsigned int* puiGameDefinedDataChangedBitmask) {
for (int i = 0; i < 4; i++) {
@ -25,22 +27,21 @@ void C_4JProfile::SetLockedProfile(int iProf) {}
bool C_4JProfile::IsSignedIn(int iQuadrant) { return iQuadrant == 0; }
bool C_4JProfile::IsSignedInLive(int iProf) { return false; }
bool C_4JProfile::IsGuest(int iQuadrant) { return false; }
UINT C_4JProfile::RequestSignInUI(bool bFromInvite, bool bLocalGame,
bool bNoGuestsAllowed,
bool bMultiplayerSignIn, bool bAddUser,
int (*Func)(void*, const bool,
const int iPad),
void* lpParam, int iQuadrant) {
unsigned int C_4JProfile::RequestSignInUI(
bool bFromInvite, bool bLocalGame, bool bNoGuestsAllowed,
bool bMultiplayerSignIn, bool bAddUser,
int (*Func)(void*, const bool, const int iPad), void* lpParam,
int iQuadrant) {
return 0;
}
UINT C_4JProfile::DisplayOfflineProfile(int (*Func)(void*, const bool,
const int iPad),
void* lpParam, int iQuadrant) {
unsigned int C_4JProfile::DisplayOfflineProfile(
int (*Func)(void*, const bool, const int iPad), void* lpParam,
int iQuadrant) {
return 0;
}
UINT C_4JProfile::RequestConvertOfflineToGuestUI(int (*Func)(void*, const bool,
const int iPad),
void* lpParam, int iQuadrant) {
unsigned int C_4JProfile::RequestConvertOfflineToGuestUI(
int (*Func)(void*, const bool, const int iPad), void* lpParam,
int iQuadrant) {
return 0;
}
void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}

View file

@ -36,9 +36,11 @@ public:
// 4 players have game defined data, puiGameDefinedDataChangedBitmask needs
// to be checked by the game side to see if there's an update needed - it'll
// have the bits set for players to be updated
void Initialise(DWORD dwTitleID, DWORD dwOfferID,
unsigned short usProfileVersion, UINT uiProfileValuesC,
UINT uiProfileSettingsC, DWORD* pdwProfileSettingsA,
void Initialise(std::uint32_t dwTitleID, std::uint32_t dwOfferID,
unsigned short usProfileVersion,
unsigned int uiProfileValuesC,
unsigned int uiProfileSettingsC,
std::uint32_t* pdwProfileSettingsA,
int iGameDefinedDataSizeX4,
unsigned int* puiGameDefinedDataChangedBitmask);
void SetTrialTextStringTable(CXuiStringTable* pStringTable, int iAccept,
@ -50,17 +52,18 @@ public:
bool IsSignedIn(int iQuadrant);
bool IsSignedInLive(int iProf);
bool IsGuest(int iQuadrant);
UINT RequestSignInUI(bool bFromInvite, bool bLocalGame,
bool bNoGuestsAllowed, bool bMultiplayerSignIn,
bool bAddUser,
int (*Func)(void*, const bool, const int iPad),
void* lpParam, int iQuadrant = XUSER_INDEX_ANY);
UINT DisplayOfflineProfile(int (*Func)(void*, const bool, const int iPad),
void* lpParam, int iQuadrant = XUSER_INDEX_ANY);
UINT RequestConvertOfflineToGuestUI(int (*Func)(void*, const bool,
const int iPad),
void* lpParam,
int iQuadrant = XUSER_INDEX_ANY);
unsigned int RequestSignInUI(bool bFromInvite, bool bLocalGame,
bool bNoGuestsAllowed,
bool bMultiplayerSignIn, bool bAddUser,
int (*Func)(void*, const bool, const int iPad),
void* lpParam,
int iQuadrant = XUSER_INDEX_ANY);
unsigned int DisplayOfflineProfile(
int (*Func)(void*, const bool, const int iPad), void* lpParam,
int iQuadrant = XUSER_INDEX_ANY);
unsigned int RequestConvertOfflineToGuestUI(
int (*Func)(void*, const bool, const int iPad), void* lpParam,
int iQuadrant = XUSER_INDEX_ANY);
void SetPrimaryPlayerChanged(bool bVal);
bool QuerySigninStatus(void);
void GetXUID(int iPad, PlayerUID* pXuid, bool bOnlineXuid);

View file

@ -395,12 +395,12 @@ DWORD XEnableGuestSignin(BOOL fEnable) { return 0; }
#ifdef _WINDOWS64
static void *profileData[4];
static bool s_bProfileIsFullVersion;
void C_4JProfile::Initialise( DWORD dwTitleID,
DWORD dwOfferID,
void C_4JProfile::Initialise( std::uint32_t dwTitleID,
std::uint32_t dwOfferID,
unsigned short usProfileVersion,
UINT uiProfileValuesC,
UINT uiProfileSettingsC,
DWORD *pdwProfileSettingsA,
unsigned int uiProfileValuesC,
unsigned int uiProfileSettingsC,
std::uint32_t *pdwProfileSettingsA,
int iGameDefinedDataSizeX4,
unsigned int *puiGameDefinedDataChangedBitmask)
{
@ -467,9 +467,9 @@ void C_4JProfile::SetLockedProfile(int iProf) {}
bool C_4JProfile::IsSignedIn(int iQuadrant) { return ( iQuadrant == 0); }
bool C_4JProfile::IsSignedInLive(int iProf) { return true; }
bool C_4JProfile::IsGuest(int iQuadrant) { return false; }
UINT C_4JProfile::RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
UINT C_4JProfile::DisplayOfflineProfile(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
UINT C_4JProfile::RequestConvertOfflineToGuestUI(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
unsigned int C_4JProfile::RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
unsigned int C_4JProfile::DisplayOfflineProfile(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
unsigned int C_4JProfile::RequestConvertOfflineToGuestUI(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; }
void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {}
bool C_4JProfile::QuerySigninStatus(void) { return true; }
void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid) {*pXuid = 0xe000d45248242f2e; }