void FCEUD_UpdateInput() { bool joy=false,mouse=false; EMOVIEMODE FCEUMOVState = FCEUMOV_Mode(); UpdateRawInputAndHotkeys(); { for(int x=0;x<2;x++) switch(InputType[x]) { case SI_GAMEPAD: joy=true; break; case SI_SNES: UpdateGamepad(true); break; case SI_MOUSE: mouse=true; break; case SI_SNES_MOUSE: mouse=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_PEC586KB: 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(false); if(mouse) if(FCEUMOVState != MOVIEMODE_PLAY) //FatRatKnight: Moved this if out of the function GetMouseData(MouseData); //A more concise fix may be desired. } }
static void M178SndClk(int a) { SensorDelay += a; if(SensorDelay > 0x32768) { SensorDelay -= 32768; GetMouseData (MouseData); lastclick = click; click = MouseData[2] & 1; // to prevent from continuos IRQ trigger if button is held. // actual circuit is just a D-C-R edge detector for IR-sensor // triggered by the active IR bat. if(lastclick && !click) X6502_IRQBegin(FCEU_IQEXT); } // if (pcm_enable) { // pcm_latch -= a; // if (pcm_latch <= 0) { // pcm_latch += pcm_clock; // pcm_enable = 0; // } // } }
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); }