27.12.2012 07:39, Bart Oldeman пишет:
> On 26 December 2012 05:37, Stas Sergeev wrote:
>> You've just tagged 1.4.0.8, so I thought this is it, and
>> pushed libpcl and some experimental mouse changes.
>> If you are going to make a release not from that tag,
>> and _really soon_, then I would suggest creating a separate
>> branch for it and revert a few commits from there.
> I hope to do it soon, sorry for the confusion. I renamed git "master"
> to "devel" and rewinded "master" to the last commit before
> coopthreads_v2.
Are you sure this even works?
force-update commits are usually a way to break things.
For instance, I now do "git pull" and my "master" stays on
c1bac77ae32a1
It would have been much better to create a release branch,
IMHO, and the bonus would be that the space-stripping
commit would still be in.
And also:
---
$ git checkout dbopl
error: Not tracking: ambiguous information for ref refs/remotes/origin/dbopl
---
I wonder what that means.
I think you can still rewind the master back to its HEAD,
because if someone did "git pull" in between, he didn't got
a rewind. But if you commit something on master now, then
perhaps there would be the real breakages.
> "devel" has some issues, i.e. if I just start dosemu in text mode and
> enter the mouse into the window from the right it jumps back to the
> edge.
Please try the attached patch.
It should be a much simpler and safer way of doing the same
thing, but I haven't tested it yet.
> There is one problem with your commit 72b864f51d4e3c5ad21ab to fix
> testsb16: it breaks adlib on i386 (try the duke3d setup program, music
> hangs). On x86-64 it works fine, not sure why.
Could you see if the patch I've just committed to dbopl branch,
fixes it in dbopl branch?
I won't be able to test the patch till the week-end, but the dbopl
branch is experimental, so I committed it with testing scheduled
for later. And I won't be able to test on i386 anyway.
diff --git a/src/base/mouse/mouse.c b/src/base/mouse/mouse.c
index e566a7e..d2c9633 100644
--- a/src/base/mouse/mouse.c
+++ b/src/base/mouse/mouse.c
@@ -62,8 +62,8 @@
* DANG_END_REMARK
*/
-#define MOUSE_RX mouse_roundx(mouse.x + mouse.x_delta)
-#define MOUSE_RY mouse_roundy(mouse.y + mouse.y_delta)
+#define MOUSE_RX mouse_roundx(mouse.x)
+#define MOUSE_RY mouse_roundy(mouse.y)
static
void mouse_cursor(int), mouse_pos(void), mouse_setpos(void),
@@ -1052,6 +1052,7 @@ static void mouse_reset(int flag)
mouse.mickeyx = mouse.mickeyy = 0;
mouse.x_delta = mouse.y_delta = 0;
+ mouse.abs_x = mouse.abs_y = 0;
mouse.textscreenmask = 0xffff;
mouse.textcursormask = 0x7f00;
@@ -1112,18 +1113,19 @@ mouse_setpos(void)
m_printf("MOUSE: ignoring 'set cursor pos' in X with no grab active\n");
return;
}
+ mouse.x = LWORD(ecx);
+ mouse.unsc_x = mouse.x * mouse.speed_x;
+ mouse.y = LWORD(edx);
+ mouse.unsc_y = mouse.y * mouse.speed_y;
+ mouse_round_coords();
if (mouse.cursor_on > 0) {
- mouse.x = LWORD(ecx);
- mouse.unsc_x = mouse.x * mouse.speed_x;
- mouse.y = LWORD(edx);
- mouse.unsc_y = mouse.y * mouse.speed_y;
- mouse_round_coords();
+ mouse.x_delta = mouse.y_delta = 0;
mouse_hide_on_exclusion();
mouse_do_cur(1);
m_printf("MOUSE: set cursor pos x:%d, y:%d\n", mouse.x, mouse.y);
} else {
- mouse.x_delta = LWORD(ecx) - mouse.x;
- mouse.y_delta = LWORD(edx) - mouse.y;
+ mouse.x_delta = mouse.x - mouse.abs_x;
+ mouse.y_delta = mouse.y - mouse.abs_y;
m_printf("MOUSE: set cursor delta x:%d, y:%d\n",
mouse.x_delta, mouse.y_delta);
}
@@ -1566,11 +1568,6 @@ void mouse_move_buttons(int lbutton, int mbutton, int rbutton)
void mouse_move_relative(int dx, int dy)
{
int unsc_x, unsc_y;
-
- dx += mouse.x_delta;
- dy += mouse.y_delta;
- mouse.x_delta = mouse.y_delta = 0;
-
unsc_x = dx * mouse.speed_x;
unsc_y = dy * mouse.speed_y;
mouse.unsc_x += unsc_x;
@@ -1627,6 +1624,10 @@ void mouse_move_absolute(int x, int y, int x_range, int y_range)
mouse.mickeyy += dy;
mouse.x = new_x;
mouse.y = new_y;
+ mouse.abs_x = x;
+ mouse.abs_y = y;
+ mouse.unsc_x = new_x * mouse.speed_x;
+ mouse.unsc_y = new_y * mouse.speed_y;
clipped = mouse_round_coords();
m_printf("mouse_move_absolute(%d, %d, %d, %d) -> %d %d \n",
diff --git a/src/include/mouse.h b/src/include/mouse.h
index e2b0c1f..36fb43c 100644
--- a/src/include/mouse.h
+++ b/src/include/mouse.h
@@ -102,6 +102,7 @@ struct mouse_struct {
/* these are clipped to min and max x; they are *not* rounded. */
short x, y;
/* for abs movement correction */
+ short abs_x, abs_y;
short x_delta, y_delta;
/* unscaled ones, to not loose the precision - these need to be int to avoid overflowing 16 bits */
int unsc_x, unsc_y;
diff --git a/src/plugin/X/X.c b/src/plugin/X/X.c
index 8c99200..51ddb9c 100644
--- a/src/plugin/X/X.c
+++ b/src/plugin/X/X.c
@@ -2510,7 +2510,6 @@ void set_mouse_position(int x, int y)
x0 = y0 = 0;
dx = -3 * x_res; dy = -3 * y_res; /* enough ??? -- sw */
mouse_move_relative(dx, dy);
- mouse_move_absolute(x0, y0, w_x_res, w_y_res);
snap_X--;
} else {
mouse_move_absolute(x, y, w_x_res, w_y_res);
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Dosemu-devel mailing list
Dosemu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dosemu-devel