void UpdateRawInputAndHotkeys() { KeyboardUpdateState(); UpdateJoysticks(); HandleHotkeys(); }
void FCEUD_UpdateInput() { bool joy=false,mouse=false; EMOVIEMODE FCEUMOVState = FCEUMOV_Mode(); KeyboardUpdateState(); UpdateJoysticks(); HandleHotkeys(); { for(int x=0;x<2;x++) switch(InputType[x]) { case SI_GAMEPAD: joy=true; break; case SI_ARKANOID: mouse=true; break; case SI_ZAPPER: mouse=true; break; case SI_POWERPADA: case SI_POWERPADB: powerpadbuf[x]=UpdatePPadData(x); break; } switch(InputType[2]) { case SIFC_ARKANOID: mouse=true; break; case SIFC_SHADOW: mouse=true; break; case SIFC_FKB: if(cidisabled) UpdateFKB(); break; case SIFC_SUBORKB: if(cidisabled) UpdateSuborKB(); break; case SIFC_HYPERSHOT: UpdateHyperShot();break; case SIFC_MAHJONG: UpdateMahjong();break; case SIFC_QUIZKING: UpdateQuizKing();break; case SIFC_FTRAINERB: case SIFC_FTRAINERA: UpdateFTrainer();break; case SIFC_TOPRIDER: UpdateTopRider();break; case SIFC_OEKAKIDS: mouse=true; break; } if(joy) UpdateGamepad(); if(mouse) if(FCEUMOVState != MOVIEMODE_PLAY) //FatRatKnight: Moved this if out of the function GetMouseData(MouseData); //A more concise fix may be desired. } }
void config_key(int pad, int key) { bool captured = false; u32 key_pressed = 0; // save the joystick states UpdateJoysticks(); while (!captured) { vector<JoystickInfo*>::iterator itjoy; if (PollX11KeyboardMouseEvent(key_pressed)) { // special case for keyboard/mouse to handle multiple keys // Note: key_pressed == 0 when ESC is hit to abort the capture if (key_pressed > 0) set_keyboad_key(pad, key_pressed, key); captured = true; break; } SDL_JoystickUpdate(); itjoy = s_vjoysticks.begin(); while ((itjoy != s_vjoysticks.end()) && (!captured)) { if ((*itjoy)->PollButtons(key_pressed)) { set_key(pad, key, key_pressed); captured = true; break; } if ((*itjoy)->PollAxes(key_pressed)) { set_key(pad, key, key_pressed); captured = true; break; } if ((*itjoy)->PollHats(key_pressed)) { set_key(pad, key, key_pressed); captured = true; break; } itjoy++; } } PAD_LOG("%s\n", KeyName(pad, key).c_str()); }
void FCEUD_UpdateInput(void) { int x; int t = 0; KeyboardUpdateState(); UpdateJoysticks(); //UpdatePhysicalInput(); KeyboardCommands(); for (x = 0; x < 2; x++) switch (InputType[x]) { case SI_GAMEPAD: t |= 1; break; case SI_ARKANOID: t |= 2; break; case SI_MOUSE: t |= 2; break; case SI_ZAPPER: t |= 2; break; case SI_POWERPADA: case SI_POWERPADB: powerpadbuf[x] = UpdatePPadData(x); break; } switch (InputType[2]) { case SIFC_ARKANOID: t |= 2; break; case SIFC_SHADOW: t |= 2; break; case SIFC_FKB: if (cidisabled) UpdateFKB(); break; case SIFC_SUBORKB: if (cidisabled) UpdateSuborKB(); break; case SIFC_HYPERSHOT: UpdateHyperShot(); break; case SIFC_MAHJONG: UpdateMahjong(); break; case SIFC_QUIZKING: UpdateQuizKing(); break; case SIFC_FTRAINERB: case SIFC_FTRAINERA: UpdateFTrainer(); break; case SIFC_TOPRIDER: UpdateTopRider(); break; case SIFC_OEKAKIDS: t |= 2; break; } if (t & 1) UpdateGamepad(); if (t & 2) GetMouseData(MouseData); }