899 Commits

Author SHA1 Message Date
Eric Warmenhoven
53d9452439
Change config_get_path/array return back to bool (#17333) 2025-01-02 14:35:33 +01:00
LibretroAdmin
1e656261b0 Local len variables need to have '_' prefix 2024-12-30 14:03:58 +01:00
Eric Warmenhoven
ef1b325978
Change return types for some path functions to size_t (#17303) 2024-12-28 22:26:30 +01:00
LibretroAdmin
18c85b5ccd Cleanups -
* Less string copies
* Some general cleanups
* Add extra param to runloop_message_queue_push so we can pass size_t
of the message
* Consistent conventions for local variable usage for certain things
2024-12-27 15:13:45 +01:00
LibretroAdmin
ed58e4a8d8 Conventionalize len variables:
* In function arguments, use 'size_t len'
* Inside the function, use '_len'
* If you need a seciondary len variable inside the function, use '__len'
2024-12-27 05:51:33 +01:00
libretroadmin
8074a833aa Cleanups/less string copies and indirection 2024-12-24 21:07:31 +01:00
libretroadmin
02bcbffbab fill_pathname - one less string copy 2024-12-24 00:08:04 +01:00
libretroadmin
2b94bccad2 (fill_pathname_join_delim) - no longer use strlen 2024-12-23 23:42:56 +01:00
libretroadmin
cdef3ff9f7 strftime - write directly into string instead of using intermediary copies 2024-12-23 07:10:03 +01:00
libretroadmin
442b9bc3da Syntax style nits 2024-12-23 05:44:40 +01:00
libretroadmin
6b8466f87a menu_driver_set_thumbnail_system/menu_driver_get_thumbnail_system
just small wrapper functions, remove
2024-12-22 04:53:04 +01:00
libretroadmin
c492e46d96 Change function signature of fill_pathname_parent_dir 2024-12-19 20:51:33 +01:00
libretroadmin
d94cc3af72 Simplify fill_pathname_application_path 2024-12-19 20:17:09 +01:00
libretroadmin
60e5858d51 fill_pathname_application_dir - use path_basedir instead of
path_basedir_wrapper
2024-12-18 23:39:24 +01:00
libretroadmin
6b801333e7 file_path - change function signatures - output char array always
is named 's', and size of it 'len'
2024-12-18 21:43:33 +01:00
Eric Warmenhoven
2650712cb3
Small tweaks to fill_pathname_application_path (#17268) 2024-12-18 11:29:58 -08:00
libretroadmin
4521f6bcb2 Cleanups 2024-12-18 20:15:58 +01:00
Viačasłaŭ
3019b926c2
Fix typos (#17068) 2024-10-01 17:36:33 -07:00
libretroadmin
23bd9686e5 Silence unused variable warnings 2024-09-11 15:48:43 +02:00
Jay Paul
e61b3ae2ba
Sort Remaps by Connected Controller (#16747)
* sort remaps by connected controller if option is enabled

* ensure dir name is valid based on input device name

* Fix comments

* Fix forbidden mixed declarations and code

* fixing build errors

* fix additional build warning/error

* Resolved code review change requests

* Changed strlcat to strlcpy as per recommendation

* Retrigger checks

* Use proper path separator.

* Ensure default value is toggled off.

* Ensure that gamepad device name is valid.
2024-09-10 17:39:35 -07:00
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
7f87a46744 More downsizing of variables 2024-09-09 16:18:32 +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
libretroadmin
9efb498bde (config_file) Use flags 2024-09-08 18:12:12 +02:00
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