Commit Graph

18 Commits

Author SHA1 Message Date
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
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
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
34a18f64e8 Don't do NULL termination on string when we pass the string to
strlcpy and/or a file_path function that does strlcpy under the hood
2022-07-23 10:46:05 +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
d706c9c5bf Start deprecating trivial functions in file_path.c 2022-07-11 19:56:46 +02:00
jdgleaver
20230ec625 (Android) Play Store builds: Do not resolve symlinks when handling core paths 2020-08-31 12:13:49 +01:00
jdgleaver
4799d2d955 (Android/Play Store) Add frontend support for core installation via Play Feature Delivery 2020-08-28 16:30:54 +01:00
twinaphex
01e5ec94bb Prefer to use string_split_noalloc 2020-08-26 12:41:57 +02:00
twinaphex
4ec216dc0b Get rid of file_path_str 2020-08-22 01:06:10 +02:00
jdgleaver
e76f5a212a (core_updater_list) Replace static entries array with dynamic array via RBUF library 2020-08-14 12:33:49 +01:00
twinaphex
6dcc7d5441 Use malloc where possible 2020-06-28 16:11:17 +02:00
jdgleaver
0a33e562f4 Add option to backup/restore installed cores 2020-06-04 12:20:58 +01:00
jdgleaver
9f4a9e9cd6 Core updater improvements 2020-05-27 17:02:43 +01:00
twinaphex
05d71ebb67 Start reducing dependency on settings struct 2020-01-02 17:41:52 +01:00
twinaphex
c4e04a6d09 Cleanups 2020-01-02 16:35:55 +01:00
Emmanuel Nicolet
69e5e97bdf fix potential double free error 2019-12-27 12:04:01 +01:00
jdgleaver
695749f155 (Core Updater) Only download when new core is available + add option to update all installed cores 2019-12-23 17:34:44 +00:00