86 Commits

Author SHA1 Message Date
libretroadmin 29f011acef * Inline find_last_slash
* explore_load_icons - fill_pathname_slash is equivalent to usage
of strlen here, no need to call strlen
2024-09-10 16:02:06 +02:00
libretroadmin 27ffd4f00b Buildfix 2024-09-09 16:02:15 +02:00
libretroadmin 73e5d955c3 Downgrade some more variables to NAME_MAX_LENGTH 2024-09-09 16:01:29 +02:00
libretroadmin b8391e233f * PATH_MAX_LENGTH redefined from 4096 to 2048
* 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
2024-09-09 05:47:32 +02:00
zoltanvb 7a475c7195 Remove some temporary buffers (#15624) 2023-08-20 10:59:15 -07:00
zoltanvb 7198f10875 Remove a needless temporary buffer from runtime_log_get_runtime_str() (#15585) 2023-08-12 05:47:00 -07:00
zoltanvb 0c64a07cdb Fix runtime display. (#15581)
Due to an error in 631301b3f7, the
runtime display string was working well only when the label had
a length of 7. Even the English "Runtime:" was a bit truncated
as a space was supposed to be added after the :, but it was
even more noticeable in other languages.
2023-08-11 14:16:50 -07:00
libretroadmin 6e06f14180 Cut some more strlcat calls 2023-07-16 22:21:43 +02:00
libretroadmin 9e34f22a29 Silence Xcode code warnings + general cleanups 2023-07-14 18:05:54 +02:00
libretroadmin 46d6240f21 Rewrite some more strlcat calls 2023-06-20 19:52:38 +02:00
libretroadmin bdc398d79f - Safer code - use strlcpy where possible instead of manual character
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
2023-06-20 16:33:55 +02:00
libretroadmin 631301b3f7 * Cut down on strlcat calls when possible and replace them with clever
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
2023-06-18 12:06:12 +02:00
libretroadmin 373d1307c0 (runtime_file.c) Cleanups - remove functions that are never used 2023-06-16 01:23:24 +02:00
libretroadmin b951a010fd Move strftime_am_pm to libretro-common and get rid of duplicated
function
2023-05-01 19:03:11 +02:00
libretroadmin 19f57716f1 Minor cleanups 2023-04-30 19:35:49 +02:00
libretroadmin c087b044c2 * Add TODO/FIXME localize notes
* More snprintf optimizations
2023-04-30 19:30:07 +02:00
libretroadmin 6f457a570b (runtime_file.c) Turn function static and add return value 2023-04-29 14:38:31 +02:00
LibretroAdmin 61e24132bf (task_save.c) Simplification in control flow
(snprintf) Try to reduce or simplify snprintf calls, only tend to
use it for processing integers/numbers and avoid it for regular
string concatenation (NOTE: we try to be a bit safer about it to
address earlier cited criticism, although we don't consider concatenating
3 or 4 characters at the end to be insecure)
(msg_hash_to_str) Try to avoid duplicate calls to the same localized
string when we can just cache the results once instead locally
2022-08-27 07:55:02 +02:00
LibretroAdmin 7507e20703 Revert "(RJSON) Combine multiple consecutive rjsonwriter_raw calls into one"
This reverts commit 82efa5a3d6.
2022-08-26 14:44:29 +02:00
LibretroAdmin 82efa5a3d6 (RJSON) Combine multiple consecutive rjsonwriter_raw calls into one
- significantly reduces the amount of function calls
2022-08-26 13:55:52 +02:00
LibretroAdmin 15fe258c1b Reduce snprintf calls 2022-08-25 13:03:08 +02:00
LibretroAdmin f48ba41b67 Remove unused variables 2022-08-23 19:41:45 +02:00
LibretroAdmin 4a1aaa55ec * Safer way of appending extensions at the end of the string - (#14318)
instead of this manual assignment, we can take advantage of the
string list in one of the instances to add the extensions to it.
Less string copying/concatenation that way later on as well.
* Append the extension to the string earlier before it's passed
to the leaf function that needs it
2022-08-13 01:40:45 +02:00
LibretroAdmin 05cf639712 Reduce amount of strlcats in retroarch.c 2022-08-08 21:46:37 +02:00
LibretroAdmin 5739c537a2 Some CXX_BUILD fixes 2022-08-05 17:40:06 +02:00