View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004769 | The Dark Mod | Coding | public | 01.04.2018 17:18 | 21.12.2021 14:20 |
Reporter | stgatilov | Assigned To | |||
Priority | low | Severity | trivial | Reproducibility | N/A |
Status | closed | Resolution | won't fix | ||
Product Version | TDM 2.06 | ||||
Summary | 0004769: Remove DirectInput --- last dependency on Windows SDK | ||||
Description | TDM does only one thing from DirectX, which is DirectInput. It is long deprecated and its use is discouraged even by Microsoft. It would be great to remove DirectInput on Windows, thus removing dependency on Windows SDK (previously on DirectX SDK). | ||||
Additional Information | Also related: http://forums.thedarkmod.com/topic/19266-revising-build-instructions/ | ||||
Tags | No tags attached. | ||||
Supposedly, this issue and related 0004768 can be tackled with a single change. | |
@stgatilov Is there more work to do here? | |
Yes, I think TDM still links dinput8.lib, hence uses DirectInput. | |
Svn 9535 replaces DI with WM for mouse input | |
Svn rev 9536 | |
Hey, please don't close issues! Unless they were created erroneously. If you finished an issue, mark it as "resolved". P.S. Here is one reason for it: closed issues are not displayed in issues search by default. |
|
@stgatilov, sorry, didn't know that | |
I tested the new build. The very first obvious problem is that now mouse movements take "acceleration" into account. So when you move mouse slowly, it turns around slowly, but when you move it fast, then same displacement results in larger movement in-game. In the main menu, acceleration is applied twice: one comes from the new mouse handling, and the second one is emulated in GUI code. I'm afraid it must be fixed: first-person shooter with mouse acceleration is a terrible idea. |
|
I can't repeat this The GUI cursor seems to move the same distance for me as the physical device at its any speed |
|
Also, svn rev 9538 broke console commands for me. If I open console with Ctrl+Alt+Tilde and write random letters for a long enough time, they are inserted after the first letter instead of being appended to the end. If I open console with just Tilde (won't work on releases without cfg changes), then it works fine. |
|
Perhaps I don't fully understand the problem as I can't repeat this one either Soon enough the input fills up for me and no new chars are accepted |
|
Speaking of broken console. It happens because "pressed" state of Ctrl button remains true even though I have released the key. I logged WM_KEYDOWN and WM_KEYUP events as you handle them in Sys_StdKeyboardInput, and I see that keyup events are lost sometimes. Perhaps this is related to pressing many keys at once. |
|
This seems to resolve it: case WM_SYSKEYUP: idKeyInput::ClearStates(); break; |
|
Created discussion: https://forums.thedarkmod.com/index.php?/topic/21039-directinput-raw-input-and-glfw/ |
|
I had to revert all the changes from this branch (rev 9548): r9533 removing DirectInput This commit deals with mouse input Converted DI to window messages The only possible issue is support for mice with 4+ buttons. WinAPI has WM codes for MS mouse additional buttons but is it universal for all mouse... r9534 removing DirectInput Fixed broken build for tools r9536 removed DirectInput r9538 removing DirectInput Included the Alt/Ctrl keys in regular processing r9541 removed remaining .h imports and DI data structures r9543. Cleaning after DirectInput removal. Feel free to restore the changes back. Although I think it is worth discussing this with Cabalistic --- that's why I created a forum thread =) |
|
We decided that it is not worth it because: 1) There are many issues like acceleration, moving out of screen/window, etc. It is not easy to write replacement, but it is easy to break things. 2) Replacing input with GLFW (as done on Linux now) is another possibility, which would make this whole effort useless. 3) DirectInput is now in Windows SDK, which is always installed with MSVC today, so there is zero inconvenience from depending on it. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
01.04.2018 17:18 | stgatilov | New Issue | |
01.04.2018 17:18 | stgatilov | Status | new => assigned |
01.04.2018 17:18 | stgatilov | Assigned To | => duzenko |
01.04.2018 17:18 | stgatilov | Relationship added | related to 0004768 |
01.04.2018 17:19 | stgatilov | Note Added: 0010344 | |
21.03.2020 17:45 | stgatilov | Target Version | => TDM 2.09 |
05.12.2020 12:40 | stgatilov | Target Version | TDM 2.09 => |
01.08.2021 14:03 | duzenko | Note Added: 0014231 | |
01.08.2021 16:52 | stgatilov | Note Added: 0014233 | |
04.08.2021 10:52 | duzenko | Note Added: 0014237 | |
05.08.2021 13:00 | duzenko | Status | assigned => closed |
05.08.2021 13:00 | duzenko | Resolution | open => fixed |
05.08.2021 13:00 | duzenko | Fixed in Version | => TDM 2.10 |
05.08.2021 13:00 | duzenko | Note Added: 0014238 | |
05.08.2021 14:33 | stgatilov | Note Added: 0014240 | |
05.08.2021 14:33 | stgatilov | Note Edited: 0014240 | |
05.08.2021 14:33 | stgatilov | Status | closed => resolved |
05.08.2021 14:33 | stgatilov | Target Version | => TDM 2.10 |
05.08.2021 15:14 | duzenko | Note Added: 0014241 | |
07.08.2021 08:24 | stgatilov | Note Added: 0014246 | |
07.08.2021 09:02 | duzenko | Note Added: 0014249 | |
07.08.2021 10:04 | stgatilov | Note Added: 0014250 | |
08.08.2021 03:58 | stgatilov | Status | resolved => assigned |
08.08.2021 06:56 | duzenko | Note Added: 0014253 | |
08.08.2021 11:02 | stgatilov | Note Added: 0014254 | |
08.08.2021 13:25 | duzenko | Note Added: 0014258 | |
08.08.2021 14:17 | stgatilov | Note Added: 0014259 | |
08.08.2021 14:23 | stgatilov | Note Added: 0014261 | |
21.12.2021 14:16 | stgatilov | Fixed in Version | TDM 2.10 => |
21.12.2021 14:16 | stgatilov | Target Version | TDM 2.10 => |
21.12.2021 14:20 | stgatilov | Assigned To | duzenko => |
21.12.2021 14:20 | stgatilov | Status | assigned => closed |
21.12.2021 14:20 | stgatilov | Resolution | fixed => won't fix |
21.12.2021 14:20 | stgatilov | Note Added: 0014603 |