From 4fd39bac56454c76e63f6a00ae7502ba5ee1500d Mon Sep 17 00:00:00 2001 From: rogerman Date: Mon, 7 Aug 2017 12:51:50 -0700 Subject: [PATCH] NDSSystem.cpp: Fix bug where certain inputs would fail to work on big-endian systems. (Regression from commit bcc7421.) --- desmume/src/NDSSystem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desmume/src/NDSSystem.cpp b/desmume/src/NDSSystem.cpp index 5966627e1..1b073fd62 100644 --- a/desmume/src/NDSSystem.cpp +++ b/desmume/src/NDSSystem.cpp @@ -304,8 +304,8 @@ bool GameInfo::hasRomBanner() else return true; } -bool GameInfo::IsCode(const char* code) const -{ +bool GameInfo::IsCode(const char* code) const +{ return memcmp(code,header.gameCode,strlen(code))==0; } @@ -2971,7 +2971,7 @@ static void NDS_applyFinalInput() if (!nds.isTouch) padExt |= 1<<6; //~touch if (LidClosed) padExt |= 1<<7; - ((u16 *)MMU.ARM7_REG)[0x136>>1] = padExt; + ((u16 *)MMU.ARM7_REG)[0x136>>1] = LOCAL_TO_LE_16(padExt); InputDisplayString=MakeInputDisplayString(padExt, pad);