d2dx icon indicating copy to clipboard operation
d2dx copied to clipboard

Unable to use "Ctrl" for quick sorting

Open crazybalzac opened this issue 3 years ago • 12 comments

That's really an amazing tool ~ Thank you for your work!

v0.99.529 My game is v1.13c and I cant use "Ctrl" for quick sorting in full screen mode. But it can be activated in window mode by scale=1 It's not convenient enough than before. Is there a way to solve the problem?

Another small question. I want to make a personal skin for the widescreen mode. I drew dc6 files before. These dc6 files could be placed in the "Data" folder to take effect. Could u tell me some ways to do it? Some simple ways?

Thank u again!

crazybalzac avatar Jun 06 '21 12:06 crazybalzac

Hmm. I use ctrl to run in both windowed and fullscreen modes, without issues. Are you using a mod to do quick sorting?

bolrog avatar Jun 06 '21 13:06 bolrog

So sad. I will check. Thank you for your help!

Hmm. I use ctrl to run in both windowed and fullscreen modes, without issues. Are you using a mod to do quick sorting?

crazybalzac avatar Jun 06 '21 13:06 crazybalzac

I have the same problem. I use a plugin 'd2hackmap' to quick swap items between inventory and stash with 'CTRL + Left Click'. This won't work with D2DX in full screen mode or scale is not equal to 1. But in window mode and scale=1, the click still works.

May be the coordinate of mouse changed/scaled by D2DX?

kangjianbin avatar Jun 08 '21 05:06 kangjianbin

I can add that I also use the 'Ctrl+ Left Click' shortcut to quickly move items, but mine comes from BaseMod, and it has been working flawlessly so far. I would imagine that the issue may be related to specific mods rather than being a general one.

tomasz1986 avatar Jun 08 '21 06:06 tomasz1986

I can add that I also use the 'Ctrl+ Left Click' shortcut to quickly move items, but mine comes from BaseMod, and it has been working flawlessly so far. I would imagine that the issue may be related to specific mods rather than being a general one.

Very important reply. Thank you. Cause I have basemod too, ill check my mods 1 by 1 again.

crazybalzac avatar Jun 08 '21 07:06 crazybalzac

I have the same problem. I use a plugin 'd2hackmap' to quick swap items between inventory and stash with 'CTRL + Left Click'. This won't work with D2DX in full screen mode or scale is not equal to 1. But in window mode and scale=1, the click still works.

May be the coordinate of mouse changed/scaled by D2DX?

Don't worry, if I find the problem, I'll come back and share it.

crazybalzac avatar Jun 08 '21 07:06 crazybalzac

@kangjianbin ahhh that might explain it! Good thinking.

bolrog avatar Jun 08 '21 11:06 bolrog

Now I'm sure the problem is d2hackmap. 'CTRL + Left Click' is invalid. I don't know if this problem will be included in the future update.

crazybalzac avatar Jun 08 '21 13:06 crazybalzac

Now I'm sure the problem is d2hackmap. 'CTRL + Left Click' is invalid. I don't know if this problem will be included in the future update.

I am sure d2hackmap has the problem. However most of 'enhanced' d2hackmaps are closed source now. Not sure how to fix it.

kangjianbin avatar Jun 09 '21 10:06 kangjianbin

maybe useful,Logic should not change much. d2hackmap source https://gitee.com/andersgong/d2hackmap

Yh793 avatar Jun 09 '21 10:06 Yh793

Thanks for the source code. I confirmed this due to mouse scale.

D2hackmap uses 'SendMessage' with WM_MOUSE_MOVE/WM_MOUSLE_LBUTTON_DOWN/UP to simulate the action of moving items between stash and inventory. For example, if player clicks CTRL+CLICK to move an item to stash, d2hackmap may send the following messages:

  1. Send LBUTTON_DOWN // pick up the item at current position (x0, y0)
  2. Send MOUSE_MOVE to (x1, y1) // Move the item (x1, y1) is a cell in stash
  3. Send LBUTTON_UP // Try to put the item

With D2DX, if scale == 2, (x1, y1) is scaled to (x1 / 2, y1 / 2); thus, d2hackmap fails to put the item.

I tried to patch these 'SendMessage' with 'CallMessage' using Diablo's original WNDPROC, so these message would not be sent to D2Dx; CTRL+Click worked again.

It is hard to say if it is d2dx's bug or d2hackmap's bug. However, since most full feature versions of d2hackmap are closed source, is there a way to fix it in D2DX?

dabeibao avatar Jul 05 '21 03:07 dabeibao

I checked d2dx code. In function 'SendMessageA_Hooked', d2dx catches WM_MOUSEMOVE and adjusts its mouse position. But for WM_LEFTBUTTONUP/DOWN, it does nothing but call origial 'SendMessageA'. Does it cause the problem?

dabeibao avatar Jul 15 '21 03:07 dabeibao