Mouse wheel support
Hi, I just tested mouse wheel in Hexen II HoT and it works, I can bind weapon change to MWHEELUP/MWHEELDOWN so it could be ported from this engine
Comments (20)
-
repo owner -
reporter Sure :) I recompiled today source and got error in snddma_dos.c missing size structure member but I see that it was updated again so now compiled OK. Is there HDA code to test?
-
reporter Yeah, I got recognized my SB Audigy2 now: http://rayer.g6.cz/1tmp/quake2snd.png unfortunatelly the sound is choppy - like something wrong with DMA buffer not properly filled and when I start a new game it crash: eax=00000000 ebx=001b75cc ecx=b9786000 edx=00000055 esi=00000001 edi=0 20:43:50 ebp=00000000 esp=00b976dc program=I:\QUAKE2\QUAKE2D.EXE
cs: sel=00a7 base=00400000 limit=0a84ffff
ds: sel=00af base=00400000 limit=ffffffff
es: sel=00af base=00400000 limit=ffffffff
fs: sel=008f base=0000ecf0 limit=0000ffff
gs: sel=00cf base=00000000 limit=0010ffff
ss: sel=00af base=00400000 limit=ffffffff
App stack: [00b97730..00b17734] Exceptn stack: [00b16940..00b14a00]
Call frame traceback EIPs:
0x00b98763
But you are on a good way :) -
look closely in your screenshot, the audio drive is setting 96khz but s_khz is 44khz. Could be part of your issue. The code is very basic at this point I'm unsure if it's even checking s_khz properly for the mpxplayer driver.
Also, crash dumps like that are pretty useless to me.
-
Also, mouse wheel should work. Are you unable to bind MWHEELUP/MWHEELDOWN? I think the code allows it now. I don't have anything with a mouse wheel (I'm a trackball man) so I can't test it.
-
reporter No, binding doesn't work (master, yesterday) while in Hexen II DOS does. The SBA sound driver seems to be removed/disabled from current master...
-
repo owner Unfortunately it really only has one slot!
which branch are we on? is everything merged to master?
-
everything is merged, master is up to date.
-
Also the binding should work. I just tested in DOSBox typing in "bind mwheelup +hook" and it accepted the command.
-
reporter It cannot be selected via options|customize controls so I directly wrote it in config.cfg. Also bind command passed in console. Then the binding appeared in options|customize controls but doesn't react on wheel roll.
-
A couple of things, there is this line of code in DOS\IN_DOS.C:
if (regs.x.ax == 0x574D && regs.h.cl == 1) { mouse_wheel = true; Com_Printf("mouse wheel support available\n"); }
Do you see mouse wheel support available at startup?
If so, refer to this in DOS\IN_DOS.C:
if (mouse_wheel) // FS: From HoT { if (mouse_wheelcounter < 0) { Key_Event (K_MWHEELUP, true, sys_msg_time); Key_Event (K_MWHEELUP, false, sys_msg_time); } else if (mouse_wheelcounter > 0) { Key_Event (K_MWHEELDOWN, true, sys_msg_time); Key_Event (K_MWHEELDOWN, false, sys_msg_time); } }
You can try adding Com_Printf's to verify that it's even reading your keys i.e.
if (mouse_wheel) // FS: From HoT { Com_Printf("\n\nCHECK MWHEEL EVENTS!!\n\n"); if (mouse_wheelcounter < 0) { Com_Printf("\n\nMWHEEL UP EVENT!!\n\n"); Key_Event (K_MWHEELUP, true, sys_msg_time); Key_Event (K_MWHEELUP, false, sys_msg_time); } else if (mouse_wheelcounter > 0) { Com_Printf("\n\nMWHEEL DOWN EVENT!!\n\n"); Key_Event (K_MWHEELDOWN, true, sys_msg_time); Key_Event (K_MWHEELDOWN, false, sys_msg_time); } }
If it still doesn't work I don't know what it is because I have the same code from HoT, unless theres some other specific stuff happening in keys.c or other places specifically for DOS but I would doubt that.
Frank
-
lol!
if (!COM_CheckParm ("-mwheel")) // FS: From HoT return;
Are you sure mouse wheel works in HoT? Because it appears he requires
-
reporter No, it just prints that 3-button mouse available. Oh, wat? Do I need extra cmdline option? But I swear that I don't use any extra param for Hexen and it works there (also binding via controls menu).
-
reporter Yeah, it works now, better documentation needed :) But with some quirk. I have binded mid button to jump and right buton to move forward. Then if I bind weapon next to mouse wheel down and press mid or right button it changes weapon together with jumping or moving forward. If I bind weapon next to mouse wheel up then it works without this side effect and change weapon only on wheel roll. I checked cfg but don't see any conflicts.
-
Should we enable this by default and provide -nowheel cmdline option like uhexen2 does?
-
I used an old version of your code (from 2011) that required -mwheel. I just assumed it was on purpose because mousewheel isn't entirely standard across DOS apparently.
Frank
-
Well yeah, I initially required -mwheel swith to enable it, but then I got usual user reports like 'hey it's not working' while they didn't read the readme. Then I enabled it by default and provided -nowheel to disable it.
What should we do?
-
If you enabling it by default hasn't caused any new issue reports then I say go for it.
Frank
-
Enabled it by default. Closing the issue.
-
- changed status to resolved
Closing as resolved. Reopen if problems.
- Log in to comment
audio is the hot topic of the day, we can revisit later.