Help with multiple mouse
Closed this issue · 1 comments
Hello! thanks for develop this fantastic project :D
I'm trying to modify MG in order to map two wiimote IR coords in two different mouses axis.
I've seen in the code (slot_manager.h/slot_manager.cpp) that there is only one keyboard/mouse slot.
So, i've created two optional static keyboard/mouse slots (keyboard_1, keyboard_2) but now i'm not sure how to map wm1.wm_ir_x/y to mouse_1 and wm2.wm_ir_x/y to mouse_2 when the core detects my two wiimotes.
I've tried to add in parser.cpp (where i think it translates the wiimote.wm_ir_x = mouse(left_x)) in order to redirect "mouse1" to keyboard_1 slot on slot_manager instance... for example, for keyboard_1/mouse_1 i added:
keyboard_slot.slot = mg->slots->keyboard_1.virt_dev.get();
in the lambda on trans_gens["mouse1"].
Could you help me with some suggestions?
Thanks a lot
Problem solved, now i have a new one.
Submitted in #114