From 7a573e75b53d371fd1cf9389fdc53b38c3bb8eba Mon Sep 17 00:00:00 2001 From: rogerman Date: Wed, 7 Dec 2016 10:28:36 -0800 Subject: [PATCH] NDSSystem: Fix bug where the X, Y, and Debug inputs were being read incorrectly, causing unintended behavior in many games. Fixes issue #3 and issue #4. (Regression from commit bcc7421.) --- desmume/src/NDSSystem.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 727d9056b..1d5e1a00e 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -2881,12 +2881,12 @@ static void NDS_applyFinalInput() countLid--; } - u16 padExt = (1<<2)|(1<<4)|(1<<5); - if(input.buttons.X) padExt |= 1<<0; - if(input.buttons.Y) padExt |= 1<<1; - if(input.buttons.G) padExt |= 1<<3; //debug button - if(!nds.isTouch) padExt |= 1<<6; //~touch - if(LidClosed) padExt |= 1<<7; + u16 padExt = (1<<2) | (1<<4) | (1<<5); + if (!input.buttons.X) padExt |= 1<<0; + if (!input.buttons.Y) padExt |= 1<<1; + if (!input.buttons.G) padExt |= 1<<3; //debug button + if (!nds.isTouch) padExt |= 1<<6; //~touch + if (LidClosed) padExt |= 1<<7; ((u16 *)MMU.ARM7_REG)[0x136>>1] = padExt;