First post, by pantercat
Hi, in Pereda Connection, a spanish graphic adventure, the internal mouse position is not correct (the mouse click is not sent where the mouse is displayed).
DOSBox >= 0.60 ...NOT OK
DOSBox = 0.58 ....OK
Related -> Bug #126 Mouse position problem in CM93 (fixed in 0.60) https://sourceforge.net/p/dosbox/bugs/126/
So I opened dosbox-0.58/src/ints/mouse.cpp and dosbox-0.60/src/ints/mouse.cpp in meld to see the differences. Here's a patch.
--- dosbox-r4275/src/ints/mouse.cpp 2019-04-21 00:50:31.000000000 +0200
+++ dosbox-r4275-patched/src/ints/mouse.cpp 2019-10-27 02:47:56.486745771 +0200
@@ -421,7 +421,7 @@
Bit16u dataPos = 0;
- Bit16s x1 = POS_X / xratio - mouse.hotx;
+ Bit16s x1 = POS_X - mouse.hotx;
Bit16s y1 = POS_Y - mouse.hoty;
Bit16s x2 = x1 + CURSORX - 1;
Bit16s y2 = y1 + CURSORY - 1;
@@ -437,7 +437,7 @@
dataPos += addx2;
- mouse.backposx = POS_X / xratio - mouse.hotx;
+ mouse.backposx = POS_X - mouse.hotx;
mouse.backposy = POS_Y - mouse.hoty;
// Draw Mousecursor
With this patch applied on top of vanilla r4275 mouse behaviour is fine again in Pereda Connection, but obviously mouse position in CM93 is wrong again. It would be possible to make it work in both cases?
Anything you need just ask 😀 Thank you very much.