#include <WINDOWS.H>
#include <iostream>
void SoftwareKeyboard :: the Update () {
Auto HWND = GetConsoleWindow ();
Auto hforewnd GetForegroundWindow = ();
HANDLE hcout = GetStdHandle (STD_OUTPUT_HANDLE);
CONSOLE_SCREEN_BUFFER_INFO coutbfInfo;
GetConsoleScreenBufferInfo (hcout, & coutbfInfo );
BOOL coutbfInfo.srWindow.Top A = - (coutbfInfo.srWindow.Bottom - coutbfInfo.srWindow.Top)> = 0;
IF (A) {
coutbfInfo.srWindow.Top = coutbfInfo.srWindow.Bottom;
SetConsoleWindowInfo (hcout, to true , & coutbfInfo.srWindow);
}
the ShowWindow (HWND, SW_MINIMIZE);
; the ShowWindow (HWND, SW_RESTORE)
"Please enter alphanumeric keyboard press the enter:" STD :: COUT <<;
STD :: String CH;
STD :: >> CH CIN;
the ShowWindow (HWND, SW_MINIMIZE);
the SetForegroundWindow (hforewnd);
the SetFocus (hforewnd);
SetActiveWindow on (hforewnd);
// the TODO (Subv): the Remove the this a hardcoded text
STD :: :: UTF8ToUTF16 the Common u16string text = (CH );
memcpy (text_memory-> GetPointer (), text.c_str (), text.length () * the sizeof (char16_t));
// the TODO (Subv): the Ask for the INPUT and the Write to IT at The Shared Memory
// the TODO ( Subv): What are the Find OUT at The Possible values for at The return code,
// some games SEEM to Sprawdź for a hardcoded A 2
config.return_code = 2;
STD :: the Vector <STD :: pair <String :: STD, STD :: >> gamenameid {String
{ "Yu-Gi of-Oh Zexal World Duel Carnival", "0004000000132B00"},
{ "Yu-Gi of Zexal-Oh -! Gekitotsu Duel Carnival", "00040000000F6C00"},
{ "Gundam Age the Try the SP" , "000400000012FB00"},
};
STD :: String :: StringFromFormat the Common TitleID = ( "% 016llX", Kernel :: g_current_process-> codeset-> program_ID);
for (STD :: the Vector <STD :: pair <STD: : String, String >> STD :: :: Iterator IT = gamenameid.begin (); IT = gamenameid.end (); ++ IT) {!
IF (IT-> SECOND == TitleID)
config.return_code = 0;
}
config.text_length text.length = ();
config.text_offset = 0;
// the TODO (Subv): We're at The Finalizing the applet Immediately is the After IT apos Started,
// But We SHOULD All the defer the this Call the After an until the INPUT has been at The . Collected
the Finalize ();
}