- goto no_pad;
- }
- else if (L_down && R_down)
- {
- FCEUI_CloseGame();
- puts("Quit");
- goto no_pad;
- }
- else if (R_down && !(last_R_down && last_shift))
- {
- FCEUI_LoadState();
- goto no_pad;
- }
- else if (L_down && !(last_L_down && last_shift))
- {
- FCEUI_SaveState();
- goto no_pad;
- }
- else if (down(A) && !(last_down(A) && last_shift))
- {
- FSkip_setting--;
- if (FSkip_setting < 0) {
- FSkip_setting = -1;
- FCEUI_DispMessage("Auto frameskip");
- }
- else
- FCEUI_DispMessage("Frameskip: %i", FSkip_setting);
- goto no_pad;
- }
- else if (down(Y) && !(last_down(Y) && last_shift))
- {
- FSkip_setting++;
- if (FSkip_setting > 8) FSkip_setting = 8;
- FCEUI_DispMessage("Frameskip: %i", FSkip_setting);
- goto no_pad;
- }
- }
- }
-
- // r is toggle savestate
- if (R_down)
- {
- if (last_R_down)
- {
- R_count++;
- if ((R_count & 31)== 31)
- {
- CurrentState=(CurrentState+1) % 10;
- FCEUI_DispMessage("Now Using Save State %d", CurrentState);
- }
- }
- }
- else
- {
- R_count=0;
- }
-
- // l is toggle turbo
- if (L_down)
- {
- if (last_L_down)
- {
- L_count++;
- if ((L_count & 31)== 31)
- {
- // 0 is none // 1 is Y & B turbo // 2 is X & A turbo
- if ((!TurboFireTop) && (!TurboFireBottom))
- {
- // was off
- TurboFireTop=1;
- TurboFireBottom=0;
- if (swapbuttons)
- {
- FCEUI_DispMessage("Turbo A and Y");
- }
- else
- {
- FCEUI_DispMessage("Turbo Y and B");
- }
- }
- else if (TurboFireTop)
- {
- TurboFireTop=0;
- TurboFireBottom=1;
- if (swapbuttons)
- {
- FCEUI_DispMessage("Turbo X and B");
- }
- else
- {
- FCEUI_DispMessage("Turbo A and X");
- }
- }
- else
- {
- TurboFireTop=0;
- TurboFireBottom=0;
- FCEUI_DispMessage("Turbo Off");
- }
-
- }
- }
- }
- else
- {
- L_count=0;
- }
-
- //unsigned long padTmp=0;
- // shift the bits in
- // up
- //padTmp=(pad & GP2X_UP) ; // 1 is 2^0,
- JS |= ((pad & GP2X_UP) << (4-0)); // 0x10 is 2^4
-
- //padTmp=(pad & GP2X_DOWN); // 0x10 is 2^4,
- JS |= ((pad & GP2X_DOWN) << (5-4)); // 0x20 is 2^5