This pull request fixes the most common controller issues, plus it has some others too. In my previous branch based on the v6391, I entirely remade the controller ID management. But in this branch, I was able to use the new Plombo's controller ID management code and it reduced a lot of lines in my fixes.
Here's the list:
CONTROLLER
Changed the default controller configuration to "NONE" for p2/p3/p4, the p1 remains the same
Disabled some internal engine functions to make the controller IDs more persistent when it's plugged/unplugged
Disabled the Android "Accelerometer" (Gyroscope)
Added the "DISCONNECTED" message when any previous configured controller is unplugged before the engine starts
MULTIHIT
Added a code to memorize the last 4 attack boxes and avoid the multihit glitch when two or more characters are hitting the same opponent
Added a multihit option in the cheats menu to enable or disable the "multihit glitch"
Added the "multihit glitch" lines to the translation file
OPENBOR "PAKS" MENU
Decreased the "MAX_MODS_NUM" constant from 100 to 18 to avoid the engine "close" bug when you have multiple paks
Replaced the broken "loadscreen32" code with a previous good one that doesn't make the engine closes at the OpenBOR paks menu when you have multiple paks
Replaced the magic number "18" in the max paks list by the "MAX_MODS_NUM" constant. In fact, 18 is the maximum paks number that can be shown in the menu at the same time with no crash, and it is also defined in the "MAX_MODS_NUM" constant
VERSION.SH
Fixed the "prompt" message that will ask the user to add the build/commit number manually
Fixed the "syntax error" message by replacing the "read -p" by "read -r"
Fixed the error message "no such file or directory" at the end of the compilation process that will not allow the the task to be completed properly
Removed the ":" from the "commit hash:" string in the export command because it doesn't allow the compressed *.7z file to be created at the end of the compilation process
V-SYNC AND FPS LIMIT
Reversed the FPS limit code to reduce CPU usage, if the engine has no FPS limit sometimes it reaches 3000+ depending on the hardware used, causing a high CPU usage (between 30% and 40%)
The Plombo's V-SYNC code is intact, if enabled it runs at 60 FPS
The previous code will only work if the V-SYNC is disabled running at 200 FPS max, no more than that
Disabled the V-SYNC by default
MISC
Enabled a new flag in the "gotomainmenu" function, use 11 to escape directly to the title screen, works only in the select screen for now
Fixed the "edge screen stuck" bug by adjusting ranges of some internal functions
Changed some button tasks priorities in the select screen, it's to avoid a issue that happens if you press "attack + right or left" buttons together when a character is highlighted, sometimes he will not be confirmed
Pull Request
General Description
This pull request fixes the most common controller issues, plus it has some others too. In my previous branch based on the v6391, I entirely remade the controller ID management. But in this branch, I was able to use the new Plombo's controller ID management code and it reduced a lot of lines in my fixes.
Here's the list:
CONTROLLER
MULTIHIT
OPENBOR "PAKS" MENU
VERSION.SH
V-SYNC AND FPS LIMIT
MISC