95 Commits

Author SHA1 Message Date
libretroadmin
f4ed638347 Rewrite libretro-common task_queue, use flags 2024-09-10 02:42:07 +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
38f278519c Remove some header includes 2024-06-16 21:37:46 +02:00
libretroadmin
fa80ec099f Rewrite some strlcat calls to strlcpy 2023-06-20 13:21:26 +02:00
LibretroAdmin
6caa139700 (cheevos.c) Fix some function prototypes for C
Rewrite some snprintfs as strlcpy/strlcat/manual assignment - only
use snprintf if we actually need the formatting
2022-08-25 15:08:02 +02:00
Jamiras
85c44f9245
more thread-awareness in task callbacks (#14337)
* more thread-awareness in task callbacks
2022-08-23 15:11:11 +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
69a2d124c0 Don't do NULL termination on string if we pass it off to strlcpy
and/or a file_path function that uses strlcpy under the hood
2022-07-24 05:39:51 +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
twinaphex
d198bef37b task_decompress.c - get rid of logging
task_autodetect_blissbox.c - get rid of logging
2020-01-25 17:22:24 +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
twinaphex
ba8f7e3e63 Cleanup task_decompress 2019-05-12 20:17:58 +02:00
Twinaphex
a797324133
Revert "task_database: use regular progress report" 2019-04-30 10:01:07 +02:00
natinusala
8c7db837b4 task_database: use regular progress report 2019-04-29 20:04:41 +02:00
twinaphex
49156e645e task_push_decompress - use path_is_valid instead of filestream_exists 2019-04-27 05:16:02 +02:00
twinaphex
3e72c502a8 strlen optimizations :
- use STRLEN_CONST for constant strings, translates to sizeof
which should be computed at compile-time
- found some places where we are needlessly calling strlen two
times instead of just once
2019-04-27 04:21:10 +02:00
Brad Parker
4f0d61a2ac update copyright 2019-02-22 19:13:36 -05:00
twinaphex
7022786f34 Revert parts of menu_widgets that were causing breakage, but leave
all the hooks in so we can add them back piece by piece again
2019-02-08 07:26:43 +01:00
natinusala
c20ab3864d First version of menu widgets (gl only) 2019-02-06 20:48:24 +01:00
orbea
28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
orbea
bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
twinaphex
ff4fa3be7a Fix more string is too small warnings 2018-11-25 18:49:04 +01:00
Brad Parker
a1b831abdb allow 7z archives to have multiple files extracted at once 2018-08-06 20:44:59 -04:00
twinaphex
0de23512e7 Should fix APK extraction (hopefully) 2018-03-01 14:59:37 +01:00
twinaphex
74309e6e1c shader code - Get rid of more hashes 2018-02-25 17:20:22 +01:00
twinaphex
f00d194ae3 Get rid of more hashes 2018-02-25 16:32:54 +01:00
twinaphex
457d543cb1 Get rid of callback function hashes 2018-02-05 19:14:55 +01:00
twinaphex
c7c4b723d6 Move path_file_exists to filestream and do away with filestream
dependencies in file/file_path
2017-12-14 20:05:46 +01:00
twinaphex
6af5bd01bf Merge retro_stat and file_path 2017-06-16 15:00:11 +02:00
twinaphex
80d9d1f143 Rewrite task_queue 2017-05-14 20:43:48 +02:00
twinaphex
ee46e427ae Revert "Use task_set_title"
This reverts commit 83b1bbe24774fa68f9e0086c4aebaa60bf5e4eee.
2017-01-23 14:15:14 +01:00
twinaphex
83b1bbe247 Use task_set_title 2017-01-23 13:29:34 +01:00
twinaphex
96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
Brad Parker
41f40acfc4 guard task struct read/writes across threads with a mutex, fixes several data races found by ThreadSanitizer and helgrind 2016-12-29 00:54:12 -05:00
twinaphex
96ffd8e025 Revert "Remove HAVE_COMPRESSION ifdefs in file_path.c"
This reverts commit 4103b70833bacdd6fdd5af697bff92b996cd4f1c.
2016-12-17 12:55:38 +01:00
twinaphex
4103b70833 Remove HAVE_COMPRESSION ifdefs in file_path.c 2016-12-17 12:20:49 +01:00
twinaphex
5364b0b837 Move compression-related code outside of libretro-common file_path.c
and move it into RetroArch's file_path_special.c file instead
2016-12-17 11:54:46 +01:00
twinaphex
ee7787dd52 (task_decompress.c) Don't log this 2016-12-15 21:21:39 +01:00
Brad Parker
d1d5584d18 update copyright 2016-10-27 11:47:10 -04:00
twinaphex
051c103ea1 Prevent implicit memsets 2016-10-16 01:31:06 +02:00
twinaphex
1388220866 (tasks) Don't do implicit memsets in crucial performance-oriented code 2016-10-08 18:31:43 +02:00
twinaphex
d6b9c4f17a Prevent some Coverity warnings 2016-09-29 19:24:18 +02:00
twinaphex
cae92ed91d (tasks) Cleanups 2016-09-29 12:02:45 +02:00
Brad Parker
af98ee1c8a Add CRC calculation function that works with archives with or without a path inside (first file is used if no path)
Add all archive's contents to database scan list when scanning files and directories

Allow scanning a single file that is an archive

Remove unnecessary prototypes from archive_file.h

Simplify retrieving of CRCs from archives when scanning
2016-09-25 00:15:05 -04:00
twinaphex
c7a739b2bd C89_BUILD fix 2016-09-20 03:01:20 +02:00
Brad Parker
d49add014c forgot more archive paths 2016-09-19 20:58:52 -04:00
twinaphex
bfeb0111f8 Fix C89_BUILD errors 2016-09-19 18:29:10 +02:00
Brad Parker
050ab56038 set archive path before extracting 2016-09-18 16:05:58 -04:00
Brad Parker
a7ffead8f6 fix more memory corruption 2016-09-18 15:20:27 -04:00
Brad Parker
530f8ae107 fix memory corruption due to wrong userdata type 2016-09-18 14:32:29 -04:00