switchports / xash3d-switch

Check out https://github.com/fgsfdsfgs/xash3d-fwgs for an updated version
GNU General Public License v3.0
63 stars 11 forks source link

Button remapping needs debounce #8

Open BryanHaley opened 5 years ago

BryanHaley commented 5 years ago

When attempting to remap a button under Configuration>Gamepad>Controls, pressing A to begin remapping a control will just bind the control to the A button (ENTER). I suspect this is due to a lack of debouncing, and the remapping menu is looking for input on the very next frame, which is almost always going to be A. If you're really fast you can manage to rebind controls, but it's extremely inconvenient nonetheless.

Possible solution: wait until the A button is released before beginning to look for inputs for the remapping.

Myaats commented 5 years ago

if I understood correctly it is the lack of waiting for the key to not be pressed in https://github.com/switchports/mainui_cpp/blob/master/menus/Controls.cpp#L302 ?

BryanHaley commented 5 years ago

Most likely yes.

I'm trying to build the project to test out some changes, but the linker isn't finding -lmainui, -lclient, and -lserver. Should I not be building via "make -f Makefile.switch" ? Seems like it's only building the main engine and not the other components of HL1.

Myaats commented 5 years ago

you need to create a lib folder and put the static libraries you get from compiling https://github.com/switchports/mainui_cpp & https://github.com/switchports/hlsdk-xash3d in there and it should link fine (this is a hacky workaround due to the lack of dynamic linking support on the switch)

BryanHaley commented 5 years ago

Successfully compiled both and moved the libs, but getting undefined reference errors in the linking stage of the main project now.

https://pastebin.com/vmZ3wMWp

Myaats commented 5 years ago

I'd compile the client, then clean and then compile the server since they share files and use #ifdef's in them based on the issue also it seems like you are missing or have an outdated version of libnx & mesa / libdrm-nouveau