libretroadmin
0f7a665439
Resync libretro-common
2024-09-05 11:49:08 +02:00
libretroadmin
afc9cb509a
CXX_BUILDFIX buildfixes
2024-07-20 19:42:45 +02:00
libretroadmin
c741c9d9a9
Remove unused variables
2024-06-15 16:44:41 +02:00
libretroadmin
f574a3a68e
(archive_file) Don't know why this won't compile for MSVC -
...
<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
2024-06-15 16:34:19 +02:00
libretroadmin
c02d8b8475
Slight change in header include
2024-06-15 16:28:30 +02:00
libretroadmin
0f5cdaf2f6
Include <compat/posix_string.h> for strtok_r MSVC compatibility
2024-06-15 16:11:26 +02:00
libretroadmin
29c89a46f1
file_archive_get_file_list_cb - remove string_list usage
2024-06-15 15:35:26 +02:00
libretroadmin
827e631903
(libretro-common) Some functions now return len
2024-06-15 12:47:51 +02:00
libretroadmin
c022e4e624
Cut down on snprintf
2024-06-15 00:56:51 +02:00
Eric Warmenhoven
e9682cbbd6
Fix #16626 fix crash parsing truncated 7z file
2024-06-05 13:06:27 -05:00
Ryunam
c5c86fe5e8
Allow all systems to check for backslashes (Windows) as last slash in path. Improves portable core logic ( #15612 )
2023-08-17 14:15:42 -07:00
libretroadmin
f1c651053f
- Use VK_FALSE/VK_TRUE consistently for Vulkan structts
...
- Some minuscule changes to file_path.c
2023-07-17 15:27:34 +02:00
libretroadmin
a5f2903253
Simplify path_basename
2023-07-17 15:13:13 +02:00
libretroadmin
4a411eb1e5
Cut down on strlcats and use strftime return value
2023-07-17 11:26:48 +02:00
libretroadmin
fe1297cc33
(file_path.c) Cut down on some strlcats
2023-07-17 10:09:34 +02:00
libretroadmin
aeff636a0f
Minor cleanups to config_file.c
2023-07-17 09:45:52 +02:00
libretroadmin
eb01ce0c09
Simplify archive_file
2023-07-16 19:55:58 +02:00
libretroadmin
4b6bd83780
Replace some more strlcat calls
2023-07-16 18:33:34 +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
edecf0cb2d
Replace more strlcat calls with strlcpy
2023-06-18 19:25:24 +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
Grisly Glee
4202f8650d
Fix trivial signedness warnings ( #15377 )
...
* Fix trivial signedness warnings
* Followup on trivial signedness warnings
2023-06-14 04:43:11 +02:00
libretroadmin
207dfe170c
Small cleanups
2023-05-03 21:10:21 +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
1db2f20665
Clean warnings
2023-04-28 02:11:52 +02:00
David G. F
5fec32649f
Fix bug introduced in f13cf9 regarding non-compressed ZIPs ( #15230 )
...
This happens on platforms with HAVE_MMAP (Linux/Mac) and with ZIPs that
contain uncompressed files.
2023-04-26 21:56:51 +02:00
David G. F
f13cf92341
Improve ZIP decompression ( #15220 )
...
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).
2023-04-25 13:17:18 +02:00
libretroadmin
27ad653dbd
Fixed another CXX_BUILD error
2023-02-23 17:11:26 +01:00
libretroadmin
4fa19e552a
CXX_BUILD buildfixes
2023-02-23 17:09:45 +01:00
libretroadmin
d55d1a8863
Fix typo
2023-02-22 14:54:53 +01:00
libretroadmin
51894c3cbb
(Config file/libretro-common) config_file_extract_value - don't make
...
it dependent on strldup which pulls in another dependency/source file -
instead just unroll strldup for this specific one-time instance
2023-02-21 16:37:30 +01:00
libretroadmin
daa9e352cc
Remove asserts
2023-01-09 00:51:05 +01:00
LibretroAdmin
3abd414656
Backport ebe5f2cc3d
-
...
Remove config_file_exists, replace with path_is_valid
2022-09-03 06:35:41 +02:00
LibretroAdmin
575e331fd1
If we already know the length of the string, use strldup instead.
...
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
2022-08-25 16:31:54 +02:00
LibretroAdmin
da13fb0f48
Don't include errno.h in files that don't justify its use
2022-08-25 05:19:30 +02:00
LibretroAdmin
c7786a45e1
Create path_get_extension_mutable and use it in menu_explore function
...
for trivial extension replacement in string
2022-08-06 19:06:31 +02:00
LibretroAdmin
2e5df6a973
fill_str_dated_filename: add size_t return value
2022-08-04 17:18:32 +02:00
LibretroAdmin
0c21a92581
* fill_pathname_expand_special will NULL-terminate string so not
...
necessary to NULL terminate passed string
* fill_pathname - add size_t return value
* Some general cleanups
2022-08-04 17:10:51 +02:00
LibretroAdmin
9ae46d2648
(file_path.c)
...
- file_path_expand_special - cut down on code duplication
- file_path_expand_special - add size_t return value
- fill_pathname_abbreviate_special - add size_t return value
2022-08-04 16:53:53 +02:00
LibretroAdmin
5172fe2ba6
fill_pathname_abbreviated_or_relative - add return value
2022-08-04 16:44:01 +02:00
LibretroAdmin
b2634ea588
* Create fill_pathname_join_special - and specify fill_pathname_join
...
as deprecated.
* Use fill_pathname_join_special in the vast majority of cases where
we can ensure out_path is a new empty string
* Get rid of some extension concatenation with strlcat where encountered
* Some general cleanups with NULL termination of strings that get immediately
passed to strlcpy/strlcpy-adjacent functions
2022-08-04 14:19:38 +02:00
LibretroAdmin
e7f3432e48
Replace some trivial strlcat usage - use return value of preceding
...
strlcpy then simply append the extension to it at this location
2022-08-04 03:45:09 +02:00
LibretroAdmin
f4c22cb236
(file_path.c) fill_pathname_join - do away with one less strlcat
2022-08-03 23:54:10 +02:00
LibretroAdmin
605c4608d9
Optimize fill_pathname_join - avoid the call to fill_pathname_slash()
...
which would have an implicit strlen cost
2022-08-01 22:14:26 +02:00
LibretroAdmin
107c69ab9e
(libretro-common) More documentation refinement
2022-08-01 11:03:58 +02:00
LibretroAdmin
c7a1d83675
(libretro-common) Start documenting leaf functon calls in function documentation
...
(libretro-common) docs - document when string has to be non-NULL or else UB (undefined behavior)
(libretro-common) stdstring.c - string_hex_to_unsigned - make strlen call unneeded
2022-08-01 09:52:39 +02:00
LibretroAdmin
fca6015011
(file_path) path_basedir - remove unnecessary strlcpy - add return value comment
...
to another function
2022-07-31 12:45:14 +02:00
LibretroAdmin
88bdaffa87
path_basedir_wrapper - get rid of unnecessary strlcpy
2022-07-31 12:42:50 +02:00
LibretroAdmin
36edb15c5b
path_parent_dir - don't do implicit strlen inside
2022-07-31 12:31:55 +02:00
libretroadmin
a6a4b845a4
Some string simplifications - don't NULL terminate if we pass
...
string to strlcpy and/or a file_path function using strlcpy under
the hood - don't do strlcpy for trivial setting of 2/3 char strings
2022-07-25 04:39:08 +02:00