Commit Graph

136 Commits

Author SHA1 Message Date
pstef 052acd4e38 Reorder arguments in calls to calloc
to silence calloc-tran sposed-args warnings.
2025-03-25 20:15:20 +00:00
LibretroAdmin 0be8fe8e3f Style nits 2025-02-09 16:07:15 +01:00
libretroadmin 279270ae5f string_list_join_concat_special - specialized version without bounds
check
2024-12-24 06:14:26 +01:00
sonninnos 8790178ae2
Win32: Filebrowser 'Show Hidden Files' corrections (#17140) 2024-10-30 17:56:47 -07:00
Eric Warmenhoven 7ae8597765
macOS: Create App Store build (#17074) 2024-10-04 12:46:51 -07:00
libretroadmin c4685e8c31 Cut down on strlcats 2024-06-16 19:15:07 +02:00
libretroadmin 29c89a46f1 file_archive_get_file_list_cb - remove string_list usage 2024-06-15 15:35:26 +02:00
libretroadmin 3e85a17d7a iFix warnings picked up by -fanalyzer 2024-05-23 23:50:23 +02:00
Eric Warmenhoven 5fd4eb905c
iOS QOL improvements (#16444)
* iOS/tvOS: bundle cores as frameworks as opposed to dylibs

* iOS/tvOS: update plist to indicate controller support

* iOS/tvOS: living within the sandbox

* iOS/tvOS: import content through share sheet

* iOS/tvOS: default audio sync off due to crash on background

* iOS/tvOS: don't try altkit if there's no reason to

* iOS/tvOS: enumerate cores for appstore distribution
2024-04-18 03:01:39 -07:00
sonninnos e7a01dbf67
Silence signedness warning (#15875) 2023-11-05 17:22:11 -08:00
zoltanvb 9d46953fa2
Exclude "System Volume Information" explicitly. (#15833) 2023-10-30 15:33:45 -07:00
Eric Warmenhoven cdb2549b2e
Sort playlists ignoring extension. (#15836)
"Sony - PlayStation 2" sorts before "Sony - PlayStation" because when
the menu sorts, it includes the `.lpl` extension, and space comes
before period.
2023-10-30 15:32:50 -07:00
libretroadmin 8aa0679cbd Fix regression 2023-07-17 17:49:49 +02:00
libretroadmin 40049274b2 string_list_join_concat - cut down on one strlcat 2023-07-17 10:33:01 +02:00
libretroadmin 5971f24237 Remove some code duplication 2023-06-20 09:37:07 +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 3fbcde000c (string_list) Silence warning 2022-11-23 05:10:35 +01:00
libretroadmin 1c9d3ad0bf Silence some warnings 2022-11-21 20:56:28 +01:00
LibretroAdmin 1e035b9385 (file_list) Get rid of superfluous small functions 2022-09-04 17:52:06 +02:00
LibretroAdmin dfb4b603e4 Get rid of superfluous wrapper function file_list_get_at_offset 2022-09-04 07:30:21 +02:00
LibretroAdmin 1a24bfe60c (file_list) Get rid of useless wrapper functions 2022-09-04 05:39:16 +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 107c69ab9e (libretro-common) More documentation refinement 2022-08-01 11:03:58 +02:00
libretroadmin 8d12918243 (libretro-common) Small cleanups - don't NULL-terminate string
if we pass it off to fill_pathname_join (or another function that
uses strlcpy under the hood)
2022-07-22 19:33:30 +02:00
LibretroAdmin 29774f5b7a
Small opts (#14186)
* (joypad_connection) Small optimizations -
* Turn functions static where possible
* Hose strlen call out of loop

* (input_driver.c) General cleanups:
* Some small code/style nits

task_screenshot.c:
* Move widget callback function for screenshots to task_screenshot.c

(file_path.c):
* Turn get_pathname_num_slashes into static function
* path_linked_list_free - always returns true, so get rid of return value
* path_linked_list_new - fix function signature
* path_get_archive_delim - do not NULL-terminate string, already done by strlcpy later on

General:
* Slight optimizations - use int/size_t for loop counter variable instead of unsigned
* Take advantage of fact that strlcpy already NULL-terminates, so don't do this explicitly
outside if we're just going to end up calling strlcpy/fill_pathname_join on it anyway
2022-07-19 10:01:33 +02:00
libretroadmin 83655420f6 file_list_prepend just a thin wrapper around file_list_insert - get
rid of it and just pass 0 as the last argument instead
2022-07-12 16:56:44 +02:00
libretroadmin 0e85113eb3 (libretro-common) Style nits/cleanups 2022-07-10 18:13:49 +02:00
jdgleaver f58c7f69d9 (nested_list) Fix heap-use-after-free errors due to pointer invalidation when resizing internal RBUF arrays 2021-08-09 23:08:17 +01:00
jdgleaver fe1f311a35 Add core option category support 2021-08-06 15:33:47 +01:00
Norman Jordan 528af55abd Adding a generic queue and linked list.
Both accept (void *) values. Also added some unit tests using CHECK.
2021-05-05 10:41:13 -07:00
twinaphex a772eb550d file_list_get_size - list can be NULL, in which case return 0 2021-01-21 00:24:32 +01:00
twinaphex 7867c4b70e Get rid of file_list_get_size calls - one line wrapper function 2021-01-20 08:31:05 +01:00
twinaphex 044209bc5a Create string_separate_noalloc 2020-08-26 23:46:16 +02:00
twinaphex 61c94fe248 Simplify string_list_new/string_list_initialize 2020-08-26 17:50:18 +02:00
jdgleaver 7a07cc1305 Fix 'Set Core Association' regression 2020-08-26 15:18:39 +01:00
twinaphex 662e37f670 Replace more instances of string_split 2020-08-26 13:35:05 +02:00
twinaphex 6df62bbccc Create string_split_noalloc 2020-08-26 03:20:42 +02:00
twinaphex a32d027f76 string_list_initialize - call deinitialize when function fails 2020-08-26 02:28:10 +02:00
jdgleaver 179e77c8b0 (string_list_join_concat) Prevent undefined behaviour if input string buffer is unterminated 2020-08-25 15:54:18 +01:00
twinaphex 8a479e6006 Create dir_list_initialize/dir_list_deinitialize 2020-08-24 18:56:25 +02:00
twinaphex 91cfcd1b83 Improve string_list_deinitialize 2020-08-24 15:11:38 +02:00
twinaphex 7a6b9fd1b2 (Ozone) Horizontal list - put on stack - it's already on heap-allocated
struct as is
2020-08-24 10:22:32 +02:00
twinaphex 93fa9a0194 Add file_list_deinitialize - does everything that file_list_free
does except for freeing the passed struct pointer
2020-08-24 01:45:45 +02:00
twinaphex 0a69d14b11 Reimplement slang_preprocess_parse_parameters 2020-08-24 00:54:24 +02:00
twinaphex cd6e1cf3fa (libretro-common) string_list - add string_list_initialize
and string_list_deinitialize - takes a pointer to initialize
and deinitialize a string list, but importantly does not
implicitly allocate and deallocate the string list pointer
itself. This way, string lists can be put on the stack instead
of always implicitly being put on heap - the struct itself is
small enough to fit on stack
2020-08-24 00:43:55 +02:00
twinaphex c1c3f75804 dir_list_read - avoid two strcmps 2020-06-27 22:26:20 +02:00
twinaphex 7cac61e5eb Use malloc instead of calloc when possible 2020-06-24 18:52:42 +02:00
twinaphex cd9ca691ca (libretro-common) Update copyright 2020-01-31 15:43:42 +01:00
twinaphex d8860104d3 Get rid of file_list_get_alt_at_offset 2019-08-20 06:13:33 +02:00
jdgleaver 5ac152a5f3 (glslang_util) Remove C++ 'isms' (where possible) 2019-08-12 13:10:50 +01:00