Combining two If Statements and having one Else Statement for both

Alright, for my project Im were stacking Adafruit motor shields on top of a USB host shield that is stacked on an Arduino Mega. This is being controlled by a PS3 controller via USB Dongle connected to USB Host Shield.

Im using two different buttons to control the same motor. The X button moves the motor forward while the TRIANGLE moves the motor backward.

The Problem is that when I run my code the first part "if(PS3.getButtonPress(CROSS))" runs very slow compared to the "if(PS3.getButtonPress(TRIANGLE))".

Can someone help me combine those two if statements while only having only one else statement as shown at the end of each statement!

Thank you so much!

Code Im Using:

void loop() { // put your main code here, to run repeatedly Usb.Task(); if(PS3.PS3Connected || PS3.PS3NavigationConnected) { if(PS3.getButtonPress(CROSS)){ M11->run(FORWARD); M11->setSpeed(150); } else{ M11->setSpeed(0); }

if(PS3.getButtonPress(TRIANGLE)){ M11->run(BACKWARD); M11->setSpeed(150); } else{ M11->setSpeed(0); } } }

I can't test this, but give it a try:

void loop() {
    // put your main code here, to run repeatedly
    Usb.Task();
    if(PS3.PS3Connected || PS3.PS3NavigationConnected) 
    { 
      if(PS3.getButtonPress(CROSS))
      {
         M11->run(FORWARD);
         M11->setSpeed(150);
      }
  

      if(PS3.getButtonPress(TRIANGLE))
      {
         M11->run(BACKWARD);
         M11->setSpeed(150);
      }
      else  
      {
         M11->setSpeed(0);
      }
   }
}

First, USE CODE TAGS!

Second, try this

void loop() {
// put your main code here, to run repeatedly
   Usb.Task();
   if(PS3.PS3Connected || PS3.PS3NavigationConnected) { 
      if(PS3.getButtonPress(CROSS)){
         M11->run(FORWARD);
         M11->setSpeed(150);
      }
      else if(PS3.getButtonPress(TRIANGLE)){
         M11->run(BACKWARD);
         M11->setSpeed(150);
      }
      else{
         M11->setSpeed(0);
      }
   }
}