if (dir) {
if (!ad->picasso_on) {
int aw = 0, ah = 0, dx, dy;
- get_custom_mouse_limits (&aw, &ah, &dx, &dy, dimensioninfo_dbl);
+ get_custom_mouse_limits(&aw, &ah, &dx, &dy, dimensioninfo_dbl);
x += dx;
y += dy;
+ float dx2, dy2, mx2, my2;
+ getgfxoffset(monid, &dx2, &dy2, &mx2, &my2);
+ if (mx2) {
+ x = (int)(x / mx2);
+ }
+ if (my2) {
+ y = (int)(y / my2);
+ }
+ x += (int)dx2;
+ y += (int)dy2;
+ } else {
+ float dx, dy, mx, my;
+ getgfxoffset(monid, &dx, &dy, &mx, &my);
+ if (mx) {
+ x = (int)(x / mx);
+ }
+ if (my) {
+ y = (int)(y / my);
+ }
+ x -= (int)dx;
+ y -= (int)dy;
}
- if (!dmaen (DMA_SPRITE))
+ if (!dmaen(DMA_SPRITE) && !ad->picasso_on) {
setmouseactivexy(0, x, y, 0);
- else
+ } else {
setmouseactivexy(0, x, y, dir);
+ }
}
return 1;
}
struct AmigaMonitor *mon = &AMonitors[monid];
int diff = 8;
- if (isfullscreen () > 0)
+ if (isfullscreen() > 0)
return;
x += mon->amigawin_rect.left;
y += mon->amigawin_rect.top;
x += (mon->amigawin_rect.right - mon->amigawin_rect.left) / 2;
y += (mon->amigawin_rect.bottom - mon->amigawin_rect.top) / 2;
}
- if (isfullscreen () < 0) {
+ if (isfullscreen() < 0) {
POINT pt;
pt.x = x;
pt.y = y;
- if (MonitorFromPoint (pt, MONITOR_DEFAULTTONULL) == NULL)
+ if (MonitorFromPoint(pt, MONITOR_DEFAULTTONULL) == NULL)
return;
}
if (mouseactive) {
- disablecapture ();
- SetCursorPos (x, y);
+ disablecapture();
+ SetCursorPos(x, y);
if (dir) {
recapture = 1;
}