Commit Graph

148 Commits

Author SHA1 Message Date
libretroadmin 327621938b Cut down on gotos 2025-07-22 14:16:31 +02:00
LibretroAdmin 26b806f860
Rewrite file_list_insert - use memmove instead of a malloc and copy (#18097)
* Rewrite file_list_insert - use memmove instead of a malloc and copy

* Use INLINE keyword - C89 buildfix
2025-07-20 05:22:49 +02:00
libretroadmin 2f5d95b0cf Move non-essential string_list functions out of file 2025-07-18 01:43:03 +02:00
libretroadmin d37068cfb8 Move code back 2025-07-15 23:35:37 +02:00
libretroadmin 3eb8589550 (file_list) Optimizations:
* file_list_insert - use memmove instead of malloc to add new
file item on top of the existing one
2025-07-14 17:04:44 +02:00
libretroadmin 215219dc51 Change libretro-common code back 2025-07-14 05:50:17 +02:00
libretroadmin 86b55c14ec (file_list)
Performance improvements:
* Various optimizations
* Reduced memory allocations - file_list_insert would call malloc
for every single item that would need to be shifted downwards. instead
it does a memmove call now
2025-07-14 00:17:12 +02:00
libretroadmin 4a7b00f43e Rewrite string_list_join_concat and menu_entries_append function 2025-07-12 20:53:48 +02:00
libretroadmin 0d854fef31 remove strlcats from string_list_join_concat_special 2025-07-12 20:36:58 +02:00
libretroadmin cb02d1ffcf Stop using strlen_size, just use regular strlen 2025-07-12 20:27:41 +02:00
libretroadmin 2dbb9f62d8 * Change some variable naming conventions
* Make return control paths less dependent on variables
2025-07-11 02:15:12 +02:00
libretroadmin bca5cafaa6 Rewrite nested_list functio
Rewrite core_info function - no more strlcat usage
2025-07-10 22:34:45 +02:00
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