Ejemplo n.º 1
0
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.
	}
}
Ejemplo n.º 2
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);
}