LAN with Multiple ZDoom Windows?

Forum rules
Image

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: LAN with Multiple ZDoom Windows?

Re: LAN with Multiple ZDoom Windows?

by GooberMan » Wed Oct 15, 2014 4:53 am

Should just be a matter of an options menu that selects which controller you're using. Be aware though that if you're trying to do it in a generic manner that it might be difficult. I picked up a 360 wireless receiver the other day for that code I mentioned, and both XInput and DirectInput provide identical information with all their query functions for each connected controller. Append the controller index to the name for XInput devices should work just well for ZDoom's purposes, but I need to dig far deeper for what I was looking at.

Re: LAN with Multiple ZDoom Windows?

by edward850 » Wed Oct 15, 2014 4:23 am

GooberMan wrote:Alternately, XInputEnable might be called on focus/defocus by ZDoom somewhere.
Sure enough, in FXInputManager::WndProcHook. Hmm, if all it takes is perhaps a -neveridle parameter and some checks to make sure window focus is never checked or something like that, I might consider throwing this in. There also needs to be restrictions on which controller is interfaced (because at the moment, all controllers are technically valid), but that shouldn't be too hard to add.

Re: LAN with Multiple ZDoom Windows?

by GooberMan » Wed Oct 15, 2014 4:17 am

We do it here too.

XInputGetState must be returning some kind of useful information in this case. Alternately, XInputEnable might be called on focus/defocus by ZDoom somewhere.

Re: LAN with Multiple ZDoom Windows?

by edward850 » Wed Oct 15, 2014 4:12 am

GooberMan wrote:XInput should just work if you poll it while the window isn't active.
Oddly enough, no. With ZDoom at least, XInput only seems to have updated events only when the window is focused. Obviously there must be a flag for this somewhere because Borderlands already seems to do this.

Re: LAN with Multiple ZDoom Windows?

by GooberMan » Wed Oct 15, 2014 3:57 am

I was literally looking at this code last night at home for an unrelated thing, and it's gone from my head.

Let me Google...

For Direct Input devices, you have SetCooperativeLevel.

XInput should just work if you poll it while the window isn't active.

Re: LAN with Multiple ZDoom Windows?

by edward850 » Wed Oct 15, 2014 3:12 am

Do you mind telling me what this flag is? I actually tried this before and literally could not find it.

Re: LAN with Multiple ZDoom Windows?

by GooberMan » Wed Oct 15, 2014 2:49 am

Uh, it's just a flag in DirectInput/XInput to allow background input.

No idea about non-Windows platforms though.

Re: LAN with Multiple ZDoom Windows?

by wildweasel » Tue Oct 14, 2014 2:15 pm

Thing is, in order to support this sort of thing, I think the entire input handler would need to be rewritten, and I'm not sure anybody feels like doing that.

Re: LAN with Multiple ZDoom Windows?

by mallo » Tue Oct 14, 2014 1:41 pm

This is a request that has been requested many, many times. I believe there is a reason why it wasn't listened to yet.

Re: LAN with Multiple ZDoom Windows?

by SyntherAugustus » Tue Oct 14, 2014 1:24 pm

It would be nice if Zdoom was coded to support this. Modern games like Borderlands and even Doomsday Engine support this sort of thing.

Re: LAN with Multiple ZDoom Windows?

by wildweasel » Sun Jun 29, 2014 9:34 am

Kaal979 wrote:But .. but its too cool to be untrue!
Then talk to the people at Microsoft or Apple and complain to them. It's part of the operating system and it won't change.

Re: LAN with Multiple ZDoom Windows?

by Kaal979 » Sun Jun 29, 2014 9:00 am

But .. but its too cool to be untrue!

Re: LAN with Multiple ZDoom Windows?

by wildweasel » Sat Jun 28, 2014 7:16 pm

Kaal979 wrote:But how about two gamepads - werent this a simple way?
No, because ZDoom will not recognize input if it is not the active window. It doesn't matter what device you're controlling it with.

Re: LAN with Multiple ZDoom Windows?

by Kaal979 » Sat Jun 28, 2014 7:08 pm

But how about two gamepads - werent this a simple way?

Re: LAN with Multiple ZDoom Windows?

by edward850 » Sat Jun 28, 2014 6:56 pm

Also you
Do not
Have to start
A new line
Every few
Words.
It is very
Annoying to read
Posts phrased in this
Format.

Top