chore: x360 keyboard stuff

i need a break man
This commit is contained in:
str1k3r committed 2026-11-01 17:20:21 -05:00
1 parent 3c34e1a560
commit f91e848c5d
4 files changed
+25 -14

No files matched your search

+2 -2
View File
@@ -149,12 +149,12 @@ C4JStorage::EMessageResult C_4JInput::RequestMessageBox(LPCWSTR uiTitle, LPCWSTR
return InternalInputManager.m_MessageUI.RequestMessageBox(uiTitle, uiText, uiButtons, uiButtonCount, dwPad, Func, lpParam, dwFocusButton);
}
/*void C_4JInput::GetText(uint16_t *UTF16String)
void C_4JInput::GetText(uint16_t *UTF16String)
{
InternalInputManager.m_Keyboard.GetText(UTF16String);
}
bool C_4JInput::VerifyStrings(WCHAR **pwStringA, int iStringC, int (*Func)(LPVOID, STRING_VERIFY_RESPONSE *), LPVOID lpParam)
/*bool C_4JInput::VerifyStrings(WCHAR **pwStringA, int iStringC, int (*Func)(LPVOID, STRING_VERIFY_RESPONSE *), LPVOID lpParam)
{
return true;
}
+15 -8
View File
@@ -9,7 +9,8 @@ CKeyboard::CKeyboard()
void CKeyboard::Tick(void)
{
if (bActive && KeyboardOverlap.InternalLow != ERROR_IO_PENDING)
//str1k3r - decomp is (bActive && KeyboardOverlap->InternalLow != ERROR_IO_PENDING) but XHasOverlappedIoCompleted does the same thing...
if (bActive && XHasOverlappedIoCompleted(&KeyboardOverlap))
{
if(Func != NULL) Func(lpParam, KeyboardOverlap.dwExtendedError == 0);
bActive = false;
@@ -88,17 +89,23 @@ C_4JInput::EKeyboardResult CKeyboard::RequestKeyboard(LPCWSTR uiTitle, LPCWSTR u
return eState;
}
//str1k3r - These 2 only exist cause of iggy
//str1k3r - These 3 only exist cause of iggy
C_4JInput::EKeyboardResult CKeyboard::RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR uiDesc, DWORD dwPad, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode)
{
return RequestKeyboard(uiTitle, uiText, uiDesc, dwPad, pwchResult, uiMaxChars, Func, lpParam, eMode);
return RequestKeyboard(uiTitle, uiText, uiDesc, dwPad, L"", uiMaxChars, Func, lpParam, eMode);
}
//str1k3r - heh i destroyed your keyboard
void CKeyboard::DestroyKeyboard()
{
if (!XHasOverlappedIoCompleted(&KeyboardOverlap))
{
XCancelOverlapped(&KeyboardOverlap);
bActive = false;
}
}
void CKeyboard::GetText(uint16_t *UTF16String)
{
//uint16_t *keyString;
//for (unsigned int index = 0; keyString[index] && index < 0x200; index++)
//{
// UTF16String[index] = keyString[index];
//}
wcsncpy_s(reinterpret_cast<wchar_t*>(UTF16String), 65, pwchResult, 64);
}
+3 -2
View File
@@ -21,7 +21,8 @@ public:
C_4JInput::EKeyboardResult RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR uiDesc, DWORD dwPad, WCHAR *pwchResult, UINT uiMaxChars, int (*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode = C_4JInput::EKeyboardMode_Default);
//str1k3r - These 2 only exist cause of iggy
//str1k3r - These 3 only exist cause of iggy
C_4JInput::EKeyboardResult RequestKeyboard(LPCWSTR uiTitle, LPCWSTR uiText, LPCWSTR uiDesc, DWORD dwPad, UINT uiMaxChars, int(*Func)(LPVOID, const bool), LPVOID lpParam, C_4JInput::EKeyboardMode eMode);
void GetText(uint16_t *UTF16String);
void DestroyKeyboard();
void GetText(uint16_t *UTF16String);
};