From b5bcc1a23af73761f6ff40f79db0a5beb8ae82f1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 19 Mar 2009 09:51:40 +0000 Subject: Merged Neil's NDS changes into trunk svn-id: r39526 --- backends/platform/ds/arm7/source/main.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'backends/platform/ds/arm7') diff --git a/backends/platform/ds/arm7/source/main.cpp b/backends/platform/ds/arm7/source/main.cpp index d252ed44de..7029d96405 100644 --- a/backends/platform/ds/arm7/source/main.cpp +++ b/backends/platform/ds/arm7/source/main.cpp @@ -34,6 +34,8 @@ #include #include #include +#include +#include #include #include //#include // not needed in current libnds @@ -135,13 +137,13 @@ void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8 switch (format) { case 1: { - flags |= SOUND_8BIT; + flags |= SOUND_FORMAT_8BIT; flags |= SOUND_REPEAT;// | (1 << 15); break; } case 0: { - flags |= SOUND_16BIT; + flags |= SOUND_FORMAT_16BIT; flags |= SOUND_REPEAT;// | (1 << 15); break; } @@ -433,13 +435,14 @@ void InterruptTimer3() { but = REG_KEYXY; if (!(but & 0x40)) { // Read the touch screen - touchPosition p = touchReadXY(); + touchPosition p; + touchReadXY(&p); // x = touchRead(TSC_MEASURE_X); // y = touchRead(TSC_MEASURE_Y); - x = p.x; - y = p.y; + x = p.rawx; + y = p.rawy; xpx = p.px; ypx = p.py; @@ -581,13 +584,13 @@ int main(int argc, char ** argv) { rtcReset(); //enable sound - powerON(POWER_SOUND); +// powerOn(POWER_SOUND); SOUND_CR = SOUND_ENABLE | SOUND_VOL(0x7F); IPC->soundData = 0; IPC->reset = false; - + fifoInit(); for (int r = 0; r < 8; r++) { IPC->adpcm.arm7Buffer[r] = (u8 *) malloc(512); -- cgit v1.2.3