Use standard callback types in 4J input headers

This commit is contained in:
notmatthewbeshay 2026-03-11 00:48:23 +11:00
parent d285f41969
commit f7e6b02835
12 changed files with 31 additions and 31 deletions

View file

@ -512,7 +512,7 @@ void C_4JInput::SetJoypadSensitivity(int /*iPad*/, float /*fSensitivity*/) {}
void C_4JInput::SetJoypadStickAxisMap(int /*iPad*/, unsigned int /*uiFrom*/, unsigned int /*uiTo*/) {}
void C_4JInput::SetJoypadStickTriggerMap(int /*iPad*/, unsigned int /*uiFrom*/, unsigned int /*uiTo*/) {}
void C_4JInput::SetKeyRepeatRate(float /*fRepeatDelaySecs*/, float /*fRepeatRateSecs*/) {}
void C_4JInput::SetDebugSequence(const char * /*chSequenceA*/, int(*/*Func*/)(LPVOID), LPVOID /*lpParam*/) {}
void C_4JInput::SetDebugSequence(const char * /*chSequenceA*/, int(*/*Func*/)(void *), void * /*lpParam*/) {}
FLOAT C_4JInput::GetIdleSeconds(int /*iPad*/) { return 0.0f; }
bool C_4JInput::IsPadConnected(int iPad) { return iPad == 0; } // slot 0 = keyboard+mouse
@ -530,7 +530,7 @@ EKeyboardResult C_4JInput::RequestKeyboard(const wchar_t * /*Title*/, const wcha
return EKeyboard_Cancelled;
}
void C_4JInput::GetText(uint16_t *UTF16String) { if (UTF16String) UTF16String[0] = 0; }
bool C_4JInput::VerifyStrings(WCHAR ** /*pwStringA*/, int /*iStringC*/,
int(*/*Func*/)(LPVOID, STRING_VERIFY_RESPONSE *), LPVOID /*lpParam*/) { return true; }
void C_4JInput::CancelQueuedVerifyStrings(int(*/*Func*/)(LPVOID, STRING_VERIFY_RESPONSE *), LPVOID /*lpParam*/) {}
bool C_4JInput::VerifyStrings(wchar_t ** /*pwStringA*/, int /*iStringC*/,
int(*/*Func*/)(void *, STRING_VERIFY_RESPONSE *), void * /*lpParam*/) { return true; }
void C_4JInput::CancelQueuedVerifyStrings(int(*/*Func*/)(void *, STRING_VERIFY_RESPONSE *), void * /*lpParam*/) {}
void C_4JInput::CancelAllVerifyInProgress(void) {}

View file

@ -93,7 +93,7 @@ public:
void SetJoypadStickAxisMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetJoypadStickTriggerMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetKeyRepeatRate(float fRepeatDelaySecs,float fRepeatRateSecs);
void SetDebugSequence( const char *chSequenceA,int( *Func)(LPVOID),LPVOID lpParam );
void SetDebugSequence( const char *chSequenceA,int( *Func)(void *),void *lpParam );
FLOAT GetIdleSeconds(int iPad);
bool IsPadConnected(int iPad);
@ -126,8 +126,8 @@ public:
// Exemption It is not required to use the Xbox LIVE service to verify real-time text communication. An example of real-time text communication is in-game text chat.
//
// Intent Protect players from inappropriate language.
bool VerifyStrings(WCHAR **pwStringA,int iStringC,int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
void CancelQueuedVerifyStrings(int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
bool VerifyStrings(wchar_t **pwStringA,int iStringC,int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelQueuedVerifyStrings(int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelAllVerifyInProgress(void);
//bool InputDetected(DWORD dwUserIndex,WCHAR *pwchInput);

View file

@ -4926,7 +4926,7 @@ void CMinecraftApp::SetDebugSequence(const char *pchSeq)
{
InputManager.SetDebugSequence(pchSeq,&CMinecraftApp::DebugInputCallback,this);
}
int CMinecraftApp::DebugInputCallback(LPVOID pParam)
int CMinecraftApp::DebugInputCallback(void *pParam)
{
CMinecraftApp* pClass = (CMinecraftApp*)pParam;
//printf("sequence matched\n");

View file

@ -311,7 +311,7 @@ public:
bool DebugSettingsOn() { return false;}
#endif
void SetDebugSequence(const char *pchSeq);
static int DebugInputCallback(LPVOID pParam);
static int DebugInputCallback(void *pParam);
//bool UploadFileToGlobalStorage(int iQuadrant, C4JStorage::eGlobalStorage eStorageFacility, std::wstring *wsFile );
// Installed DLC

View file

@ -110,7 +110,7 @@ public:
void SetJoypadStickAxisMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetJoypadStickTriggerMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetKeyRepeatRate(float fRepeatDelaySecs,float fRepeatRateSecs);
void SetDebugSequence( const char *chSequenceA,int( *Func)(LPVOID),LPVOID lpParam );
void SetDebugSequence( const char *chSequenceA,int( *Func)(void *),void *lpParam );
FLOAT GetIdleSeconds(int iPad);
unsigned int GetConnectedGamepadCount();
bool IsPadConnected(int iPad);
@ -147,8 +147,8 @@ public:
// Exemption It is not required to use the Xbox LIVE service to verify real-time text communication. An example of real-time text communication is in-game text chat.
//
// Intent Protect players from inappropriate language.
bool VerifyStrings(WCHAR **pwStringA,int iStringC,int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
void CancelQueuedVerifyStrings(int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
bool VerifyStrings(wchar_t **pwStringA,int iStringC,int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelQueuedVerifyStrings(int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelAllVerifyInProgress(void);
//bool InputDetected(DWORD dwUserIndex,WCHAR *pwchInput);

View file

@ -173,7 +173,7 @@ public:
void SetJoypadStickAxisMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetJoypadStickTriggerMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetKeyRepeatRate(float fRepeatDelaySecs,float fRepeatRateSecs);
void SetDebugSequence( const char *chSequenceA,int( *Func)(LPVOID),LPVOID lpParam );
void SetDebugSequence( const char *chSequenceA,int( *Func)(void *),void *lpParam );
FLOAT GetIdleSeconds(int iPad);
bool IsPadConnected(int iPad);
void SetCircleCrossSwapped(bool swapped);
@ -214,8 +214,8 @@ public:
// Exemption It is not required to use the Xbox LIVE service to verify real-time text communication. An example of real-time text communication is in-game text chat.
//
// Intent Protect players from inappropriate language.
bool VerifyStrings(WCHAR **pwStringA,int iStringC,int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
void CancelQueuedVerifyStrings(int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
bool VerifyStrings(wchar_t **pwStringA,int iStringC,int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelQueuedVerifyStrings(int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelAllVerifyInProgress(void);
//bool InputDetected(DWORD dwUserIndex,WCHAR *pwchInput);

View file

@ -115,7 +115,7 @@ public:
void SetJoypadStickAxisMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetJoypadStickTriggerMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetKeyRepeatRate(float fRepeatDelaySecs,float fRepeatRateSecs);
void SetDebugSequence( const char *chSequenceA,int( *Func)(LPVOID),LPVOID lpParam );
void SetDebugSequence( const char *chSequenceA,int( *Func)(void *),void *lpParam );
FLOAT GetIdleSeconds(int iPad);
bool IsPadConnected(int iPad);
bool IsCircleCrossSwapped();
@ -153,8 +153,8 @@ public:
// Exemption It is not required to use the Xbox LIVE service to verify real-time text communication. An example of real-time text communication is in-game text chat.
//
// Intent Protect players from inappropriate language.
bool VerifyStrings(WCHAR **pwStringA,int iStringC,int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
void CancelQueuedVerifyStrings(int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
bool VerifyStrings(wchar_t **pwStringA,int iStringC,int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelQueuedVerifyStrings(int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelAllVerifyInProgress(void);
//bool InputDetected(DWORD dwUserIndex,WCHAR *pwchInput);

View file

@ -124,7 +124,7 @@ public:
void SetJoypadStickAxisMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetJoypadStickTriggerMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetKeyRepeatRate(float fRepeatDelaySecs,float fRepeatRateSecs);
void SetDebugSequence( const char *chSequenceA,int( *Func)(LPVOID),LPVOID lpParam );
void SetDebugSequence( const char *chSequenceA,int( *Func)(void *),void *lpParam );
FLOAT GetIdleSeconds(int iPad);
bool IsPadConnected(int iPad);
void SetCircleCrossSwapped(bool swapped);
@ -164,8 +164,8 @@ public:
// Exemption It is not required to use the Xbox LIVE service to verify real-time text communication. An example of real-time text communication is in-game text chat.
//
// Intent Protect players from inappropriate language.
bool VerifyStrings(WCHAR **pwStringA,int iStringC,int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
void CancelQueuedVerifyStrings(int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
bool VerifyStrings(wchar_t **pwStringA,int iStringC,int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelQueuedVerifyStrings(int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelAllVerifyInProgress(void);
bool IsVitaTV();

View file

@ -93,7 +93,7 @@ public:
void SetJoypadStickAxisMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetJoypadStickTriggerMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetKeyRepeatRate(float fRepeatDelaySecs,float fRepeatRateSecs);
void SetDebugSequence( const char *chSequenceA,int( *Func)(LPVOID),LPVOID lpParam );
void SetDebugSequence( const char *chSequenceA,int( *Func)(void *),void *lpParam );
FLOAT GetIdleSeconds(int iPad);
bool IsPadConnected(int iPad);
@ -126,8 +126,8 @@ public:
// Exemption It is not required to use the Xbox LIVE service to verify real-time text communication. An example of real-time text communication is in-game text chat.
//
// Intent Protect players from inappropriate language.
bool VerifyStrings(WCHAR **pwStringA,int iStringC,int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
void CancelQueuedVerifyStrings(int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
bool VerifyStrings(wchar_t **pwStringA,int iStringC,int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelQueuedVerifyStrings(int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelAllVerifyInProgress(void);
//bool InputDetected(DWORD dwUserIndex,WCHAR *pwchInput);

View file

@ -84,7 +84,7 @@ public:
void SetJoypadStickAxisMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetJoypadStickTriggerMap(int iPad,unsigned int uiFrom, unsigned int uiTo);
void SetKeyRepeatRate(float fRepeatDelaySecs,float fRepeatRateSecs);
void SetDebugSequence( const char *chSequenceA,int( *Func)(LPVOID),LPVOID lpParam );
void SetDebugSequence( const char *chSequenceA,int( *Func)(void *),void *lpParam );
FLOAT GetIdleSeconds(int iPad);
bool IsPadConnected(int iPad);
@ -116,8 +116,8 @@ public:
//
// Intent Protect players from inappropriate language.
/*
bool VerifyStrings(WCHAR **pwStringA,int iStringC,int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
void CancelQueuedVerifyStrings(int( *Func)(LPVOID,STRING_VERIFY_RESPONSE *),LPVOID lpParam);
bool VerifyStrings(wchar_t **pwStringA,int iStringC,int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelQueuedVerifyStrings(int( *Func)(void *,STRING_VERIFY_RESPONSE *),void *lpParam);
void CancelAllVerifyInProgress(void);
*/
//bool InputDetected(DWORD dwUserIndex,WCHAR *pwchInput);

View file

@ -156,7 +156,7 @@ void SignTileEntity::SetMessage(int iIndex,std::wstring &wsText)
}
// 4J-PB - added for string verification
int SignTileEntity::StringVerifyCallback(LPVOID lpParam,STRING_VERIFY_RESPONSE *pResults)
int SignTileEntity::StringVerifyCallback(void *lpParam,STRING_VERIFY_RESPONSE *pResults)
{
// results will be in m_pStringVerifyResponse
SignTileEntity *pClass=(SignTileEntity *)lpParam;
@ -195,4 +195,4 @@ std::shared_ptr<TileEntity> SignTileEntity::clone()
result->m_bVerified = m_bVerified;
result->m_bCensored = m_bCensored;
return result;
}
}

View file

@ -42,8 +42,8 @@ public:
bool isEditable();
void setEditable(bool isEditable);
virtual void setChanged();
static int StringVerifyCallback(LPVOID lpParam,STRING_VERIFY_RESPONSE *pResults);
static int StringVerifyCallback(void *lpParam,STRING_VERIFY_RESPONSE *pResults);
// 4J Added
virtual std::shared_ptr<TileEntity> clone();
};
};