Пример #1
0
u32 GetJoy(int pad)
{
	UpdatePads();

	// request to go back to menu
	if (MenuRequested())
	{
		ScreenshotRequested = 1;
		updateRumbleFrame();
		return 0;
	}

	u32 J = DecodeJoy(pad);
	// don't allow up+down or left+right
	if ((J & 48) == 48)
		J &= ~16;
	if ((J & 192) == 192)
		J &= ~128;
	updateRumbleFrame();
	return J;
}
Пример #2
0
void GetJoy()
{
	JSReturn = 0; // reset buttons pressed
	unsigned char pad[4];
	short i;

	UpdatePads();

	// Turbo mode
	// RIGHT on c-stick and on classic ctrlr right joystick
	if(userInput[0].pad.substickX > 70 || userInput[0].WPAD_StickX(1) > 70)
		turbomode = 1;
	else
		turbomode = 0;

	// request to go back to menu
	if(MenuRequested())
		ScreenshotRequested = 1; // go to the menu

	for (i = 0; i < 4; i++)
		pad[i] = DecodeJoy(i);

	JSReturn = pad[0] | pad[1] << 8 | pad[2] << 16 | pad[3] << 24;
}
Пример #3
0
void QMyListWidget::contextMenuEvent(QContextMenuEvent *e)
{
   emit MenuRequested(e->globalPos());
}