X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Finputest.c;h=d4a3d44c50f6150bda75fbf381b1a3a2c0773787;hb=53d918625e7c5e1e9da827755449d6a901e6d302;hp=9693104657c8cae19a318d09d173bf53caf6db17;hpb=95fee4f41b0855e0a97af6db8a8fadf524bfbbe2;p=16.git diff --git a/src/inputest.c b/src/inputest.c index 96931046..d4a3d44c 100644 --- a/src/inputest.c +++ b/src/inputest.c @@ -26,21 +26,34 @@ void main(int argc, char *argv[]) -{ -// CursorInfo control; +{ player_t player[MaxPlayers]; - hwconfig hw; - player.KbdDefs = {0x1d,0x38,0x47,0x48,0x49,0x4b,0x4d,0x4f,0x50,0x51}; + inconfig in; + //word i=0; - extern boolean Keyboard[NumCodes]; - IN_Startup(); - IN_Default(0,&player,ctrl_Joystick); -// IN_Default(0,ctrl_Joystick); - while(!IN_qb(sc_Escape)) - { - IN_ReadControl(0,&control); -// printf("%u\n", Keyboard[sc_Escape]); + in.KbdDefs[0].button0 = 0x1d; + in.KbdDefs[0].button1 = 0x38; + //in.KbdDefs[0].upleft = 0x47; + in.KbdDefs[0].up = 0x48; + //in.KbdDefs[0].upright = 0x49; + in.KbdDefs[0].left = 0x4b; + in.KbdDefs[0].right = 0x4d; + //in.KbdDefs[0].downleft = 0x4f; + in.KbdDefs[0].down = 0x50; + //in.KbdDefs[0].downright = 0x51; - } - IN_Shutdown(); + if(IN_Startup(&in)) + { + IN_Default(0,&player,ctrl_Joystick, &in); + while(!in.Keyboard[sc_Escape]) + { + IN_ReadControl(0,&player, &in); + //printf("%u\n", in.Keyboard[sc_Escape]); + //printf("i=%u\n", i); + printf(""); + //i++; + } + IN_Shutdown(&in); + } + //printf("%u\n", in.Keyboard[sc_Escape]); }