[Scummvm-git-logs] scummvm master -> c36a5f339555d11353ecbd704e4c812e77d4a0ae
sev-
sev at scummvm.org
Sat Apr 7 09:30:17 CEST 2018
This automated email contains information about 7 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9111998c49 DS: Fix compilation with devkitARM r47
a873544840 DS: Fix building with AGI engine disabled
7717b55e51 DS: Disable highres games by default
a7defc2136 DS: Add necessary files to .gitignore
b3ccc1ce74 DS: Fix detection of external libraries
a43f914abe DS: Fix building with ndstool
c36a5f3395 DS: Fix touch input
Commit: 9111998c49958646a9216548b9c886136afd7c14
https://github.com/scummvm/scummvm/commit/9111998c49958646a9216548b9c886136afd7c14
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2018-04-07T09:30:07+02:00
Commit Message:
DS: Fix compilation with devkitARM r47
Changed paths:
audio/softsynth/opl/mame.cpp
backends/fs/ds/ds-fs-factory.cpp
backends/fs/ds/ds-fs.cpp
backends/platform/ds/arm9/source/cdaudio.cpp
backends/platform/ds/arm9/source/dsmain.cpp
backends/platform/ds/arm9/source/dsmain.h
backends/platform/ds/arm9/source/dsoptions.cpp
backends/platform/ds/arm9/source/fat/disc_io.c
backends/platform/ds/arm9/source/osystem_ds.cpp
backends/platform/ds/arm9/source/osystem_ds.h
backends/platform/ds/arm9/source/wordcompletion.cpp
backends/platform/ds/arm9/source/zipreader.cpp
backends/platform/ds/ds.mk
backends/plugins/ds/ds-provider.cpp
configure
diff --git a/audio/softsynth/opl/mame.cpp b/audio/softsynth/opl/mame.cpp
index eb08582..cba9542 100644
--- a/audio/softsynth/opl/mame.cpp
+++ b/audio/softsynth/opl/mame.cpp
@@ -29,6 +29,10 @@
#include <stdarg.h>
#include <math.h>
+#if defined(__DS__)
+#include "dsmain.h"
+#endif
+
#include "mame.h"
#include "audio/mixer.h"
@@ -40,10 +44,6 @@
#include "common/config-manager.h"
#endif
-#if defined(__DS__)
-#include "dsmain.h"
-#endif
-
namespace OPL {
namespace MAME {
diff --git a/backends/fs/ds/ds-fs-factory.cpp b/backends/fs/ds/ds-fs-factory.cpp
index 98c522f..3ec4a40 100644
--- a/backends/fs/ds/ds-fs-factory.cpp
+++ b/backends/fs/ds/ds-fs-factory.cpp
@@ -24,9 +24,9 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
#if defined(__DS__)
+#include "dsmain.h" //for the isGBAMPAvailable() function
#include "backends/fs/ds/ds-fs-factory.h"
#include "backends/fs/ds/ds-fs.h"
-#include "dsmain.h" //for the isGBAMPAvailable() function
namespace Common {
DECLARE_SINGLETON(DSFilesystemFactory);
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index 035178d..1df54a9 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -23,12 +23,12 @@
// Disable symbol overrides for FILE as that is used in FLAC headers
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
+#include "dsmain.h"
#include "common/str.h"
#include "common/util.h"
//#include <NDS/ARM9/console.h> //basic print funcionality
#include "backends/fs/ds/ds-fs.h"
#include "backends/fs/stdiostream.h"
-#include "dsmain.h"
#include "fat/gba_nds_fat.h"
#include "common/bufferedstream.h"
diff --git a/backends/platform/ds/arm9/source/cdaudio.cpp b/backends/platform/ds/arm9/source/cdaudio.cpp
index c963f4d..3952eeb 100644
--- a/backends/platform/ds/arm9/source/cdaudio.cpp
+++ b/backends/platform/ds/arm9/source/cdaudio.cpp
@@ -23,10 +23,10 @@
// Disable symbol overrides for FILE as that is used in FLAC headers
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
+#include "dsmain.h"
#include "cdaudio.h"
#include "backends/fs/ds/ds-fs.h"
#include "common/config-manager.h"
-#include "dsmain.h"
#include "NDS/scummvm_ipc.h"
#define WAV_FORMAT_IMA_ADPCM 0x14
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp
index b7c9c10..ac030db 100644
--- a/backends/platform/ds/arm9/source/dsmain.cpp
+++ b/backends/platform/ds/arm9/source/dsmain.cpp
@@ -573,7 +573,7 @@ void initGame() {
s_currentGame = &gameList[0]; // Default game
for (int r = 0; r < NUM_SUPPORTED_GAMES; r++) {
- if (!stricmp(gameName, gameList[r].gameId)) {
+ if (!scumm_stricmp(gameName, gameList[r].gameId)) {
s_currentGame = &gameList[r];
// consolePrintf("Game list num: %d\n", r);
}
diff --git a/backends/platform/ds/arm9/source/dsmain.h b/backends/platform/ds/arm9/source/dsmain.h
index fec97d8..7345fc2 100644
--- a/backends/platform/ds/arm9/source/dsmain.h
+++ b/backends/platform/ds/arm9/source/dsmain.h
@@ -23,6 +23,8 @@
#ifndef _DSMAIN_H
#define _DSMAIN_H
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include <nds.h>
#include "osystem_ds.h"
diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp
index 733592e..5620381 100644
--- a/backends/platform/ds/arm9/source/dsoptions.cpp
+++ b/backends/platform/ds/arm9/source/dsoptions.cpp
@@ -20,8 +20,8 @@
*
*/
-#include "dsoptions.h"
#include "dsmain.h"
+#include "dsoptions.h"
#include "gui/dialog.h"
#include "gui/gui-manager.h"
#include "gui/widgets/list.h"
diff --git a/backends/platform/ds/arm9/source/fat/disc_io.c b/backends/platform/ds/arm9/source/fat/disc_io.c
index 5896cbb..74fc8fb 100644
--- a/backends/platform/ds/arm9/source/fat/disc_io.c
+++ b/backends/platform/ds/arm9/source/fat/disc_io.c
@@ -367,7 +367,7 @@ bool disc_setDsSlotInterface (void)
active_interface = DLDI_GetInterface();
- if (stricmp((char *)(&_dldi_driver_name), "Default (No interface)")) {
+ if (strcasecmp((char *)(&_dldi_driver_name), "Default (No interface)")) {
char name[48];
memcpy(name, &_dldi_driver_name, 48);
name[47] = '\0';
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index 861ee2e..03d336e 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -23,6 +23,7 @@
// Allow use of stuff in <time.h>
#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h"
#include "common/system.h"
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index f883bd1..585f72b 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -24,6 +24,8 @@
#ifndef _OSYSTEM_DS_H_
#define _OSYSTEM_DS_H_
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include "backends/base-backend.h"
#include "common/events.h"
#include "nds.h"
diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp
index 36fa312..2257c49 100644
--- a/backends/platform/ds/arm9/source/wordcompletion.cpp
+++ b/backends/platform/ds/arm9/source/wordcompletion.cpp
@@ -20,8 +20,8 @@
*
*/
-#include "wordcompletion.h"
#include "osystem_ds.h"
+#include "wordcompletion.h"
#include "engines/agi/agi.h" // Caution for #define for NUM_CHANNELS, causes problems in mixer_intern.h
#ifdef ENABLE_AGI
diff --git a/backends/platform/ds/arm9/source/zipreader.cpp b/backends/platform/ds/arm9/source/zipreader.cpp
index 0de2b0c..2ad0a39 100644
--- a/backends/platform/ds/arm9/source/zipreader.cpp
+++ b/backends/platform/ds/arm9/source/zipreader.cpp
@@ -23,6 +23,7 @@
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h"
+#include "common/str.h"
#include "zipreader.h"
ZipFile::ZipFile() {
@@ -193,7 +194,7 @@ bool ZipFile::findFile(const char *search) {
}
- if (!stricmp(name, searchName)) {
+ if (!scumm_stricmp(name, searchName)) {
// consolePrintf("'%s'=='%s'\n", name, searchName);
return true; // Got it!
} else {
diff --git a/backends/platform/ds/ds.mk b/backends/platform/ds/ds.mk
index 78216cb..f2e7707 100644
--- a/backends/platform/ds/ds.mk
+++ b/backends/platform/ds/ds.mk
@@ -75,7 +75,7 @@ endif
# Compiler options for files which should be optimised for speed
-OPT_SPEED := -O3 -mno-thumb
+OPT_SPEED := -O3 -marm
# Compiler options for files which should be optimised for space
OPT_SIZE := -Os -mthumb
@@ -134,7 +134,8 @@ engines/teenagent/actor.o: CXXFLAGS:=$(CXXFLAGS) $(OPT_SPEED)
#
#############################################################################
-all: scummvm.nds scummvm.ds.gba
+# FIXME: Newer versions of devkitARM don't include dsbuild, which is needed to create scummvm.ds.gba
+all: scummvm.nds # scummvm.ds.gba
clean: dsclean
@@ -170,10 +171,10 @@ dsclean:
# HACK/FIXME: C compiler, for cartreset.c -- we should switch this to use CXX
# as soon as possible.
-CC := $(DEVKITPRO)/devkitARM/bin/arm-eabi-gcc
+CC := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-gcc
# HACK/TODO: Pointer to objcopy. This should really be set by configure
-OBJCOPY := $(DEVKITPRO)/devkitARM/bin/arm-eabi-objcopy
+OBJCOPY := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-objcopy
#
# Set various flags
@@ -194,7 +195,7 @@ ARM7_CFLAGS := -g -Wall -O2\
ARM7_CXXFLAGS := $(ARM7_CFLAGS) -fno-exceptions -fno-rtti
-ARM7_LDFLAGS := -g $(ARM7_ARCH) -mno-fpu
+ARM7_LDFLAGS := -g $(ARM7_ARCH) -mfloat-abi=soft
# HACK/FIXME: Define a custom build rule for cartreset.c.
# We do this because it is a .c file, not a .cpp file and so is outside our
diff --git a/backends/plugins/ds/ds-provider.cpp b/backends/plugins/ds/ds-provider.cpp
index 1c97445..b21c483 100644
--- a/backends/plugins/ds/ds-provider.cpp
+++ b/backends/plugins/ds/ds-provider.cpp
@@ -20,6 +20,8 @@
*
*/
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include "common/scummsys.h"
#if defined(DYNAMIC_MODULES) && defined(__DS__)
diff --git a/configure b/configure
index caaef90..9dfe3ad 100755
--- a/configure
+++ b/configure
@@ -1476,7 +1476,7 @@ dreamcast)
ds)
_host_os=ds
_host_cpu=arm
- _host_alias=arm-eabi
+ _host_alias=arm-none-eabi
;;
gamecube)
_host_os=gamecube
@@ -2555,7 +2555,8 @@ case $_host_os in
append_var DEFINES "-DARM"
append_var DEFINES "-DNONSTANDARD_PORT"
append_var CXXFLAGS "-isystem $DEVKITPRO/libnds/include"
- append_var CXXFLAGS "-isystem $DEVKITPRO/devkitARM/arm-eabi/include"
+ append_var CXXFLAGS "-I$DEVKITPRO/portlibs/nds/include"
+ append_var CXXFLAGS "-I$DEVKITPRO/portlibs/armv5te/include"
append_var CXXFLAGS "-mcpu=arm9tdmi"
append_var CXXFLAGS "-mtune=arm9tdmi"
append_var CXXFLAGS "-fomit-frame-pointer"
@@ -2566,7 +2567,7 @@ case $_host_os in
append_var CXXFLAGS "-fuse-cxa-atexit"
append_var LDFLAGS "-specs=ds_arm9.specs"
append_var LDFLAGS "-mthumb-interwork"
- append_var LDFLAGS "-mno-fpu"
+ append_var LDFLAGS "-mfloat-abi=soft"
append_var LDFLAGS "-Wl,-Map,map.txt"
if test "$_dynamic_modules" = no ; then
append_var LDFLAGS "-Wl,--gc-sections"
@@ -2576,6 +2577,8 @@ case $_host_os in
# append_var LDFLAGS "-Wl,--retain-symbols-file,ds.syms"
fi
append_var LDFLAGS "-L$DEVKITPRO/libnds/lib"
+ append_var LDFLAGS "-L$DEVKITPRO/portlibs/nds/lib"
+ append_var LDFLAGS "-L$DEVKITPRO/portlibs/armv5te/lib"
append_var LIBS "-lnds9"
;;
freebsd*)
@@ -3727,7 +3730,7 @@ POST_OBJS_FLAGS := -Wl,--no-whole-archive
append_var DEFINES "-DUNCACHED_PLUGINS"
append_var DEFINES "-DELF_NO_MEM_MANAGER"
_mak_plugins='
-PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwork -mno-fpu
+PLUGIN_LDFLAGS += -Wl,-T$(srcdir)/backends/plugins/ds/plugin.ld -mthumb-interwork -mfloat-abi=soft
'
;;
freebsd*)
@@ -5232,6 +5235,7 @@ cat > config.h << EOF
$_config_h_data
/* Data types */
+#ifndef SCUMMVM_DONT_DEFINE_TYPES
typedef unsigned $type_1_byte byte;
typedef unsigned int uint;
typedef unsigned $type_1_byte uint8;
@@ -5242,6 +5246,7 @@ typedef signed $type_1_byte int8;
typedef signed $type_2_byte int16;
typedef signed $type_4_byte int32;
typedef signed $type_8_byte int64;
+#endif
typedef $type_ptr uintptr;
Commit: a8735448407d2e88d4c6b5fe169237b4eac9b73c
https://github.com/scummvm/scummvm/commit/a8735448407d2e88d4c6b5fe169237b4eac9b73c
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2018-04-07T09:30:07+02:00
Commit Message:
DS: Fix building with AGI engine disabled
Changed paths:
gui/predictivedialog.cpp
diff --git a/gui/predictivedialog.cpp b/gui/predictivedialog.cpp
index 5650fd8..b01e495 100644
--- a/gui/predictivedialog.cpp
+++ b/gui/predictivedialog.cpp
@@ -35,7 +35,7 @@
#include "common/file.h"
#include "common/savefile.h"
-#ifdef __DS__
+#if defined(__DS__) && defined(ENABLE_AGI)
#include "backends/platform/ds/arm9/source/wordcompletion.h"
#endif
@@ -945,7 +945,7 @@ void PredictiveDialog::loadDictionary(Common::SeekableReadStream *in, Dict &dict
while ((ptr = strchr(ptr, '\n'))) {
*ptr = 0;
ptr++;
-#ifdef __DS__
+#if defined(__DS__) && defined(ENABLE_AGI)
// Pass the line on to the DS word list
DS::addAutoCompleteLine(dict.dictLine[i - 1]);
#endif
@@ -960,7 +960,7 @@ void PredictiveDialog::loadDictionary(Common::SeekableReadStream *in, Dict &dict
// FIXME: We use binary search on _predictiveDict.dictLine, yet we make no at_tempt
// to ever sort this array (except for the DS port). That seems risky, doesn't it?
-#ifdef __DS__
+#if defined(__DS__) && defined(ENABLE_AGI)
// Sort the DS word completion list, to allow for a binary chop later (in the ds backend)
DS::sortAutoCompleteWordList();
#endif
Commit: 7717b55e51e7caedf6a203e74a757c20f21a8755
https://github.com/scummvm/scummvm/commit/7717b55e51e7caedf6a203e74a757c20f21a8755
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2018-04-07T09:30:07+02:00
Commit Message:
DS: Disable highres games by default
Changed paths:
configure
diff --git a/configure b/configure
index 9dfe3ad..cf50277 100755
--- a/configure
+++ b/configure
@@ -3547,7 +3547,7 @@ esac
# Enable High resolution engines (>320x240) support only for backends which support it
#
case $_host in
- gcw0)
+ ds | gcw0)
if test "$_highres" = yes ; then
_highres=yes
else
Commit: a7defc21363ce4a89b5ac65220956555d0210f78
https://github.com/scummvm/scummvm/commit/a7defc21363ce4a89b5ac65220956555d0210f78
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2018-04-07T09:30:07+02:00
Commit Message:
DS: Add necessary files to .gitignore
Changed paths:
.gitignore
diff --git a/.gitignore b/.gitignore
index c19710f..d2ad011 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,6 +25,9 @@ lib*.a
/*,e1f
/scummvm-ps3.pkg
/*.ipk
+/map.txt
+*.elf
+/*.nds
/.project
/.cproject
/.settings
@@ -53,6 +56,7 @@ lib*.a
/backends/platform/ds/arm7/build
/backends/platform/ds/arm7/source/libcartreset/*.bak
/backends/platform/ds/arm7/source/libcartreset/*.d
+/backends/platform/ds/arm9/data/*.h
/backends/platform/ds/arm9/scummvm-?
/backends/platform/maemo/scummvm
Commit: b3ccc1ce744d161e0c64b4400ef51e6c4f50f346
https://github.com/scummvm/scummvm/commit/b3ccc1ce744d161e0c64b4400ef51e6c4f50f346
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2018-04-07T09:30:07+02:00
Commit Message:
DS: Fix detection of external libraries
Changed paths:
configure
diff --git a/configure b/configure
index cf50277..fbb1372 100755
--- a/configure
+++ b/configure
@@ -2565,7 +2565,6 @@ case $_host_os in
append_var CXXFLAGS "-fdata-sections"
append_var CXXFLAGS "-fno-strict-aliasing"
append_var CXXFLAGS "-fuse-cxa-atexit"
- append_var LDFLAGS "-specs=ds_arm9.specs"
append_var LDFLAGS "-mthumb-interwork"
append_var LDFLAGS "-mfloat-abi=soft"
append_var LDFLAGS "-Wl,-Map,map.txt"
@@ -2579,6 +2578,7 @@ case $_host_os in
append_var LDFLAGS "-L$DEVKITPRO/libnds/lib"
append_var LDFLAGS "-L$DEVKITPRO/portlibs/nds/lib"
append_var LDFLAGS "-L$DEVKITPRO/portlibs/armv5te/lib"
+ append_var LIBS "-specs=ds_arm9.specs"
append_var LIBS "-lnds9"
;;
freebsd*)
Commit: a43f914abefaae80dd91c496ba5b77b46fb9d8d2
https://github.com/scummvm/scummvm/commit/a43f914abefaae80dd91c496ba5b77b46fb9d8d2
Author: Matthew Stewart (stewartmatthew6 at gmail.com)
Date: 2018-04-07T09:30:07+02:00
Commit Message:
DS: Fix building with ndstool
Changed paths:
backends/platform/ds/ds.mk
diff --git a/backends/platform/ds/ds.mk b/backends/platform/ds/ds.mk
index f2e7707..18feea0 100644
--- a/backends/platform/ds/ds.mk
+++ b/backends/platform/ds/ds.mk
@@ -146,11 +146,8 @@ dsclean:
# TODO: Add a 'dsdist' target ?
-%.bin: %.elf
- $(OBJCOPY) -S -O binary $< $@
-
-%.nds: %.bin $(ndsdir)/arm7/arm7.bin
- ndstool -c $@ -9 $< -7 $(ndsdir)/arm7/arm7.bin -b $(srcdir)/$(ndsdir)/$(LOGO) "$(@F);ScummVM $(VERSION);DS Port"
+%.nds: %.elf $(ndsdir)/arm7/arm7.elf
+ ndstool -c $@ -9 $< -7 $(ndsdir)/arm7/arm7.elf -b $(srcdir)/$(ndsdir)/$(LOGO) "$(@F);ScummVM $(VERSION);DS Port"
%.ds.gba: %.nds
dsbuild $< -o $@ -l $(srcdir)/$(ndsdir)/arm9/ndsloader.bin
@@ -173,9 +170,6 @@ dsclean:
# as soon as possible.
CC := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-gcc
-# HACK/TODO: Pointer to objcopy. This should really be set by configure
-OBJCOPY := $(DEVKITPRO)/devkitARM/bin/arm-none-eabi-objcopy
-
#
# Set various flags
#
@@ -219,10 +213,6 @@ $(ndsdir)/arm7/arm7.elf: \
$(ndsdir)/arm7/source/main.o
$(CXX) $(ARM7_LDFLAGS) -specs=ds_arm7.specs $+ -L$(DEVKITPRO)/libnds/lib -lnds7 -o $@
-# Rule for creating ARM7 .bin files from .elf files
-$(ndsdir)/arm7/arm7.bin: $(ndsdir)/arm7/arm7.elf
- $(OBJCOPY) -O binary $< $@
-
Commit: c36a5f339555d11353ecbd704e4c812e77d4a0ae
https://github.com/scummvm/scummvm/commit/c36a5f339555d11353ecbd704e4c812e77d4a0ae
Author: Matthew Stewart (stewartmatthew6 at gmail.com)
Date: 2018-04-07T09:30:07+02:00
Commit Message:
DS: Fix touch input
Changed paths:
backends/platform/ds/arm7/source/main.cpp
backends/platform/ds/arm9/source/dsmain.cpp
diff --git a/backends/platform/ds/arm7/source/main.cpp b/backends/platform/ds/arm7/source/main.cpp
index c4a22b8..f0765f6 100644
--- a/backends/platform/ds/arm7/source/main.cpp
+++ b/backends/platform/ds/arm7/source/main.cpp
@@ -443,11 +443,11 @@ void InterruptTimer3() {
x = p.rawx;
y = p.rawy;
- xpx = p.px;
- ypx = p.py;
+ //xpx = p.px;
+ //ypx = p.py;
-// xpx = ( ((SCREEN_WIDTH -60) * x) / TOUCH_WIDTH ) - TOUCH_OFFSET_X;
- // ypx = ( ((SCREEN_HEIGHT-60) * y) / TOUCH_HEIGHT ) - TOUCH_OFFSET_Y;
+ xpx = ( ((SCREEN_WIDTH -60) * x) / TOUCH_WIDTH ) - TOUCH_OFFSET_X;
+ ypx = ( ((SCREEN_HEIGHT-60) * y) / TOUCH_HEIGHT ) - TOUCH_OFFSET_Y;
// xpx = (IPC->touchX - (int16) TOUCH_CAL_X1) * CNTRL_WIDTH / TOUCH_WIDTH + (int16) (TOUCH_CNTRL_X1 - 8);
// ypx = (IPC->touchY - (int16) TOUCH_CAL_Y1) * CNTRL_HEIGHT / TOUCH_HEIGHT + (int16) (TOUCH_CNTRL_Y1 - 8);
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp
index ac030db..e44e360 100644
--- a/backends/platform/ds/arm9/source/dsmain.cpp
+++ b/backends/platform/ds/arm9/source/dsmain.cpp
@@ -2499,7 +2499,7 @@ void penUpdate() {
// if (getKeysHeld() & KEY_L) consolePrintf("%d, %d penX=%d, penY=%d tz=%d\n", IPC->touchXpx, IPC->touchYpx, penX, penY, IPC->touchZ1);
- bool penDownThisFrame = (IPC->touchZ1 > 0) && (IPC->touchXpx > 0) && (IPC->touchYpx > 0);
+ bool penDownThisFrame = (!(IPC->buttons & 0x40)) && (IPC->touchXpx > 0) && (IPC->touchYpx > 0);
static bool moved = false;
if (( (tapScreenClicks) || getKeyboardEnable() ) && (getIsDisplayMode8Bit())) {
@@ -2626,7 +2626,7 @@ void penUpdate() {
penDownSaved = true;
}
- if ((IPC->touchZ1 > 0) && (IPC->touchXpx > 0) && (IPC->touchYpx > 0)) {
+ if ((!(IPC->buttons & 0x40)) && (IPC->touchXpx > 0) && (IPC->touchYpx > 0)) {
penX = IPC->touchXpx + touchXOffset;
penY = IPC->touchYpx + touchYOffset;
moved = true;
@@ -2648,7 +2648,7 @@ void penUpdate() {
- if ((IPC->touchZ1 > 0) || ((penDownFrames == 2)) ) {
+ if ((!(IPC->buttons & 0x40)) || ((penDownFrames == 2)) ) {
penDownLastFrame = true;
penDownFrames++;
} else {
More information about the Scummvm-git-logs
mailing list