* sort remaps by connected controller if option is enabled
* ensure dir name is valid based on input device name
* Fix comments
* Fix forbidden mixed declarations and code
* fixing build errors
* fix additional build warning/error
* Resolved code review change requests
* Changed strlcat to strlcpy as per recommendation
* Retrigger checks
* Use proper path separator.
* Ensure default value is toggled off.
* Ensure that gamepad device name is valid.
* Massive reduction in heap space allocation, going from settings struct
264kb to 119Kb
* Use NAME_MAX_LENGTH for base paths/names, etc
* Use DIR_MAX_LENGTH for directory sizes
<compat/posix_string.h> gets included which should redefine strtok_r
for MSVC usage but it just doesn't work and fails at linking stage, will have to figure this out
later
assignments for strings longer than 2 chars
- Use strlcpy concatenation instead of strlcat
- Make sure that what remains of iteration of the '_len' variable
for manual char assignment
is done in a safer way so mistakes are less possible
usage of strlcpy (when position/offset of previous strlcpy/snprintf call
is known. strlcat implementation in libretro-common makes implicit strlen
call, using strlcpy avoids this
* Reduce a bunch of local char variables by use of said clever usage,
should save up on local stack size usage
This reduces the amount of memory Retroarch needs to extract a ROM file.
It will only need the size of the ROM plus 128KiB to extract the file
from the ZIP. Previously it needed as much as twice that amount if the
compression ratio was not great. This is useful on memory constrained
platforms and has no impact on platforms with plenty of memory.
Handles all cases correctly (with and without MMAP, for cores that
require fullpath or not, small and big ZIP files).
Avoids the internal strlen call inside strdup, and strdup is a deprecated
function starting from MSVC2005 anyways.
NOTE: Do NOT pass STRLEN_CONST as n parameter to strldup, it needs to
be at least +1 character higher than the strlen return value of the same
string