View Issue Details

IDProjectCategoryView StatusLast Update
0004769The Dark ModCodingpublic08.08.2021 14:23
Reporterstgatilov Assigned Toduzenko  
PrioritylowSeveritytrivialReproducibilityN/A
Status assignedResolutionfixed 
Product VersionTDM 2.06 
Target VersionTDM 2.10Fixed in VersionTDM 2.10 
Summary0004769: Remove DirectInput --- last dependency on Windows SDK
DescriptionTDM 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 InformationAlso related:
http://forums.thedarkmod.com/topic/19266-revising-build-instructions/
TagsNo tags attached.

Relationships

related to 0004768 resolvedstgatilov Support high-DPI mouse 

Activities

stgatilov

stgatilov

01.04.2018 17:19

administrator   ~0010344

Supposedly, this issue and related 0004768 can be tackled with a single change.
duzenko

duzenko

01.08.2021 14:03

developer   ~0014231

@stgatilov Is there more work to do here?
stgatilov

stgatilov

01.08.2021 16:52

administrator   ~0014233

Yes, I think TDM still links dinput8.lib, hence uses DirectInput.
duzenko

duzenko

04.08.2021 10:52

developer   ~0014237

Svn 9535 replaces DI with WM for mouse input
duzenko

duzenko

05.08.2021 13:00

developer   ~0014238

Svn rev 9536
stgatilov

stgatilov

05.08.2021 14:33

administrator   ~0014240

Last edited: 05.08.2021 14:33

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.
duzenko

duzenko

05.08.2021 15:14

developer   ~0014241

@stgatilov, sorry, didn't know that
stgatilov

stgatilov

07.08.2021 08:24

administrator   ~0014246

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.
duzenko

duzenko

07.08.2021 09:02

developer   ~0014249

I can't repeat this
The GUI cursor seems to move the same distance for me as the physical device at its any speed
stgatilov

stgatilov

07.08.2021 10:04

administrator   ~0014250

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.
duzenko

duzenko

08.08.2021 06:56

developer   ~0014253

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
stgatilov

stgatilov

08.08.2021 11:02

administrator   ~0014254

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.
duzenko

duzenko

08.08.2021 13:25

developer   ~0014258

This seems to resolve it:

        case WM_SYSKEYUP:
            idKeyInput::ClearStates();
            break;
stgatilov

stgatilov

08.08.2021 14:17

administrator   ~0014259

Created discussion:
  https://forums.thedarkmod.com/index.php?/topic/21039-directinput-raw-input-and-glfw/
stgatilov

stgatilov

08.08.2021 14:23

administrator   ~0014261

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 =)

Issue History

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