chore: x360 keyboard stuff
i need a break man
This commit is contained in:
1 parent
3c34e1a560
commit
f91e848c5d
4 files changed
+25
-14
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user