aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-02-04 00:12:08 +0100
committerStapleButter <thetotalworm@gmail.com>2017-02-04 00:12:08 +0100
commit829b04480299ce2c3ed44b56f5f1b99e2f5f762f (patch)
treed7656a38065e0d7c409ad66b827685bd786c4e41
parent67f0c7b123e0df3334e2a5c7c2ba889acab4cf10 (diff)
improve touchscreen precision
-rw-r--r--SPI.cpp7
-rw-r--r--melonDS.depend2
2 files changed, 5 insertions, 4 deletions
diff --git a/SPI.cpp b/SPI.cpp
index 5883429..ba79a66 100644
--- a/SPI.cpp
+++ b/SPI.cpp
@@ -100,8 +100,8 @@ void Reset()
*(u16*)&Firmware[userdata+0x5A] = 0;
Firmware[userdata+0x5C] = 1;
Firmware[userdata+0x5D] = 1;
- *(u16*)&Firmware[userdata+0x5E] = 254;
- *(u16*)&Firmware[userdata+0x60] = 190;
+ *(u16*)&Firmware[userdata+0x5E] = 254<<4;
+ *(u16*)&Firmware[userdata+0x60] = 190<<4;
Firmware[userdata+0x62] = 255;
Firmware[userdata+0x63] = 191;
@@ -318,7 +318,8 @@ void SetTouchCoords(u16 x, u16 y)
if (y == 0xFFF) return;
- // TODO: eventually convert?
+ TouchX <<= 4;
+ TouchY <<= 4;
}
u8 Read()
diff --git a/melonDS.depend b/melonDS.depend
index 5da2753..e517db7 100644
--- a/melonDS.depend
+++ b/melonDS.depend
@@ -10,7 +10,7 @@
1481161027 c:\documents\sources\melonds\types.h
-1486162025 source:c:\documents\sources\melonds\nds.cpp
+1486163139 source:c:\documents\sources\melonds\nds.cpp
<stdio.h>
<string.h>
"NDS.h"