HRESULT _stdcall GetDeviceData(THIS_ DWORD a,LPDIDEVICEOBJECTDATA b,LPDWORD c,DWORD d) {
     //Switch not necessary because only keyboard is faked
     //TODO: When adding mouse support remember to check sequence
     if(*c==1&&SkipIntro) {
         //Skip the second intro
         SkipIntro=false;
         FakeBuffer[0].dwOfs=0x01;
         FakeBuffer[0].dwData=0x80;
         FakeBuffer[0].dwSequence=1;
         FakeBuffer[0].dwTimeStamp=::GetTickCount();
         FakeBuffer[0].uAppData=0xffffffff;
         *b=FakeBuffer[0];
         return DI_OK;
     } else if(*c==1&&UseFakeBuffer>0) {
         //Inject a fake keypress
         *b=FakeBuffer[--UseFakeBuffer];
         if(UseFakeBuffer==0) FinishedFake=true;
         return DI_OK;
     } else {
         //Read a real keypress
         HRESULT hr2=RealDevice->GetDeviceData(a,b,c,d);
         if(*c>0&&b) {
             sequence=b[*c-1].dwSequence+1;
         }
         return hr2;
     }
 }
 HRESULT _stdcall GetDeviceData(DWORD a,LPDIDEVICEOBJECTDATA b,LPDWORD c,DWORD d) {
     return RealDevice->GetDeviceData(a,b,c,d);
 }