AutoHold for L and R
This commit is contained in:
parent
a55e58a804
commit
fbf63505cf
|
@ -2477,7 +2477,7 @@ static std::string MakeInputDisplayString(u16 pad, u16 padExt) {
|
|||
|
||||
void ClearAutoHold(void) {
|
||||
|
||||
for (int i=0; i < 10; i++) {
|
||||
for (int i=0; i < 12; i++) {
|
||||
AutoHold.hold(i)=false;
|
||||
}
|
||||
}
|
||||
|
@ -2560,6 +2560,8 @@ void NDS_setPad(bool R,bool L,bool D,bool U,bool T,bool S,bool B,bool A,bool Y,b
|
|||
if(AutoHold.A) A=!padarray[7];
|
||||
if(AutoHold.Y) Y=!padarray[8];
|
||||
if(AutoHold.X) X=!padarray[9];
|
||||
if(AutoHold.L) W=!padarray[10];
|
||||
if(AutoHold.R) E=!padarray[11];
|
||||
|
||||
//this macro is the opposite of what you would expect
|
||||
#define FIX(b) (b?0:0x80)
|
||||
|
|
|
@ -84,6 +84,8 @@ struct autohold {
|
|||
bool A;
|
||||
bool Y;
|
||||
bool X;
|
||||
bool L;
|
||||
bool R;
|
||||
|
||||
bool &hold(int i) { return ((bool*)this)[i]; }
|
||||
};
|
||||
|
|
|
@ -2208,6 +2208,8 @@ void input_process()
|
|||
if(AutoHoldPressed && A) AutoHold.A ^= true;
|
||||
if(AutoHoldPressed && Y) AutoHold.Y ^= true;
|
||||
if(AutoHoldPressed && X) AutoHold.X ^= true;
|
||||
if(AutoHoldPressed && W) AutoHold.L ^= true;
|
||||
if(AutoHoldPressed && E) AutoHold.R ^= true;
|
||||
|
||||
NDS_setPad( R, L, D, U, T, S, B, A, Y, X, W, E, G, F);
|
||||
|
||||
|
|
Loading…
Reference in New Issue