djhackersdev / bemanitools

Runs recent Konami arcade games and emulates various arcade hardware.
The Unlicense
79 stars 15 forks source link

IIDX 25/26 - Add the ability to leave a camera unassigned #245

Closed JeffPaine4890 closed 1 year ago

JeffPaine4890 commented 1 year ago

By setting the custom camera device override in iidxhook.conf to SKIP, bemanitools will now leave that camera unassigned. This is particularly useful for leaving camera 1 unassigned and letting bemanitools automatically map camera 2; most people have their webcams pointed at their face, and camera 2 corresponds to the face cam ingame whereas camera 1 is the hand cam. Also if someone for some reason wanted to use the QR scanning function, that goes through camera 2, so someone with only one camera would have been completely unable to use that.

icex2 commented 1 year ago

Also requsted review from @willxinc. I think he knows that part of the code better than I do.

willxinc commented 1 year ago

I agree with the bit from icex2 about not using "SKIP" otherwise sounds reasonable to me, if adding the config is too much of a lift, let me know, I can make the changes and submit a new PR for you

JeffPaine4890 commented 1 year ago

I glanced at the code this morning and I think I can figure it out. Not sure if I'll have time tonight, if you want to do it in the meantime go ahead, otherwise I'll fix it up when I can.

I was thinking of something like adding cam.enable_camera1 and cam.enable_camera2 which would both default to true.

willxinc commented 1 year ago

yep that sounds reasonable, main issue is the config keys, etc. since the config format doesn't support arrays, but if you check how device_id is handled, should be pretty clear

JeffPaine4890 commented 1 year ago

Okay, now the config files for iidx25-29 include a cam.disable_camera1 and cam.disable_camera2 option, which both default to false.

Also, while I was updating iidxhook-27.conf, I aligned the cam.disable_emu default with iidx28/29's default

icex2 commented 1 year ago

Nice job. lgtm aside the few cleanups that I pointed out. Will approve and merge once that's done.

JeffPaine4890 commented 1 year ago

You're right I forgot to change that back >_>