Commit graph

179 commits

Author SHA1 Message Date
zoltanvb 4d8283a460
Minor improvements for db / playlist handling (#16060)
Do not load rom_name as nothing is using it (but it does occupy memory)
Add two more media index options for label sanitization
2023-12-30 11:45:36 -08:00
Joe Osborn 679083a08b
Graceful fallback to readonly mode if RDB can't be opened readwrite (#15569)
* Graceful fallback to readonly mode if RDB can't be opened readwrite
* let RA open db readonly
2023-08-10 11:04:47 -07:00
libretroadmin 458fe7a761 * Remove more strlcat calls
* Safer manual char assignment in database_info.c
2023-06-20 17:43:33 +02:00
libretroadmin b04a926170 (libretro-db) Further cleanups 2023-02-17 17:49:36 +01:00
libretroadmin de717a50d3 Style nits 2023-01-22 16:12:27 +01:00
LibretroAdmin 28f55845b6 * database_info cleanups:
- database_cursor_close's return value was never used, and doesn't
necessitate a function either
- some other misc. cleanups
2022-10-06 19:43:44 +02:00
LibretroAdmin 94ed25be56
Cleanups (#14296)
- (database_info.c) Optimizations for database_info_build_query_enum() -
 it would call strlcat at the very least 3 times, normally more than that.
 Every strlcat call is at least one or more strlens. Reduce it all down
 to manual string concatenation and one strlcat
- (database_info_build_query_enum) - always NULL terminates string so no need for NULL termination done by callee
* (menu_displaylist) use smaller strings for basename paths, remove one unnecessary string
in menu_displaylist.c function
- (disk_index_file.c) Avoid another trivial string concatenation by doing
it manually after fill_pathname_join_special
- (fill_pathname_join_delim) since fill_pathname_join_delim() now has a return value, use it for 
string concatenation
- (platform_unix) - Use BUFSIZ as size for a buffer in system_property_get
- some other trivial strlcat usage replacements
2022-08-06 18:04:40 +02:00
TheRetroPirate 6f90b24f72 added more categories to the explore menu 2022-03-15 05:51:20 +01:00
twinaphex 460f5e745d Silence some MSVC 2019 code analysis warnings 2022-03-05 14:39:56 +01:00
jdgleaver b2a4620f3b (Database) Fix heap-buffer-overflow when fetching CRC values 2021-08-11 17:32:45 +01:00
twinaphex 9910dfbee2 Replace strcpy_literal usage of trivial string setting 2021-04-06 11:21:28 +02:00
twinaphex 1296fc4745 use strlcpy_literal for string literal copies 2020-09-19 23:28:01 +02:00
Bernhard Schelling 0ddb073784 First set of cleanups to archive handling
- Don't read the entire archive file into memory on systems without HAVE_MMAP
- Support ZIP files between 2GB ~ 4GB on 32bit architectures
- Remove zip exclusive members from `file_archive_transfer`
- Add `zip_context_t` for zip like the already existing `sevenzip_context_t`
- Unify cleanups of zip and 7z in `file_archive_file_backend::archive_parse_file_free`
- Handle some sizes and offsets as int64_t (preparation for future Zip64 support)
- Handle compression methods in `zlib_stream_decompress_data_to_file_init` not in `file_archive_perform_mode`
- Return progress of 7z iterating with `file_archive_parse_file_progress`
2020-07-12 00:51:35 +09:00
twinaphex ef51ef1fb1 database_info_list_new - md5 and sha1 need to be freed 2020-06-29 19:27:50 +02:00
twinaphex 6dcc7d5441 Use malloc where possible 2020-06-28 16:11:17 +02:00
twinaphex de36ff20fb Create string_ends_with_size 2020-06-25 14:38:06 +02:00
twinaphex 091b1c88c2 Optimize database_cursor_iterate 2020-06-08 15:27:08 +02:00
twinaphex e54e12876b Header cleanups 2020-01-25 17:51:07 +01:00
twinaphex 6dd46e6971 Fix database query regression 2019-09-26 13:37:58 +02:00
twinaphex b94b9e2adb Go back to plain strlcpy/strlcat - probably best to look at
opportunities to reduce these calls vs. replacing them with
unsafe macros
2019-09-23 00:19:01 +02:00
twinaphex 3b057d9605 Start using STRLCAT_CONST_INCR and STRLCPY_CONST 2019-09-20 23:33:17 +02:00
twinaphex 4c3e0d44b8 Revert "Start using string_is_equal_memcmp and"
This reverts commit 26d6aee1eb.
2019-04-29 04:04:33 +02:00
twinaphex 26d6aee1eb Start using string_is_equal_memcmp and
string_is_equal_memcmp_fast
2019-04-28 17:23:11 +02:00
Brad Parker c606e8893c null check 2019-02-28 16:56:41 -05:00
Brad Parker 4f0d61a2ac update copyright 2019-02-22 19:13:36 -05: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
Brad Parker 849792dc2c fix memory leaks 2018-08-18 01:15:50 -04:00
twinaphex 6f0fc2426d (database_info/task_database) Get rid of list_special dependencies 2018-04-10 04:13:45 +02:00
twinaphex 86c826350e Start moving dependencies out of certain files 2018-04-09 22:18:25 +02:00
twinaphex b4ea072ce7 (database_info.c) Cleanups 2018-02-25 21:58:52 +01:00
twinaphex d6d89e10ba Get rid of msg_hash dependency 2018-02-25 17:48:00 +01:00
twinaphex fa40be2aa5 Simplify sorting 2018-02-25 17:47:36 +01:00
twinaphex 071476174d database_info.c - get rid of hashes 2018-02-25 17:43:12 +01:00
twinaphex 8d99fd7ce0 Cleanup string manipulation 2018-02-01 11:16:13 +01:00
twinaphex 3564562563 database_info.c - use malloc 2017-09-29 05:01:00 +02:00
twinaphex e8f39f004e MSVC buildfixes 2017-09-19 21:29:28 +02:00
Twinaphex ee06a8f175 Merge pull request #5447 from bkoropoff/scanning2
More scanning rework
2017-09-19 15:46:04 +02:00
Aaron Oneal fb8fe84684 Fix archive scanning
Archive scans were broken for cores like Atari 5200 and Commodore 64 because archive contents were skipped if a core reported it supported compressed files. The problem is, it's a false assumption that just because a core supports compressed files that the content database contains CRCs for compressed files.

Instead of adding the contents of every compressed file to the scan list ahead of time, the patched logic now checks for the CRC of the archive itself as it always has but then adds the archive contents to the scan list if the archive itself is no match. This maintains the logic of adding only the archive if the core supports compressed files and the archive CRC matches but also allows for deeper content scans when there is no match.

The patch also removes `core_info_unsupported_content_path` as it was redundant with existing `core_info_database_supports_content_path` logic.
2017-09-18 23:15:28 -07:00
Brian Koropoff 93d05665c2 database_info: prioritize scanning cue/gdi files
Scan them before the tracks so we can avoid scanning large
files we don't need to.
2017-09-18 09:03:43 -07:00
twinaphex 3860d95c8f Reduce stack usage 2017-09-09 21:41:38 +02:00
Brad Parker 5733d8ebd5 move content list builder into scanner task with progress, fixes menu freeze with large playlists 2017-07-09 00:44:02 -04:00
twinaphex 1cc350bfdb Prevent some implicit memsets 2017-04-20 09:21:08 +02:00
twinaphex 8c89ec158c Update copyrights 2017-03-22 03:09:18 +01:00
Twinaphex 216e7bcdaf Silence more warnings on iOS 2017-02-26 21:46:19 +01:00
Twinaphex b7b3b2cb5f Try to prevent truckload of warnings on iOS 2017-02-26 10:33:03 +01:00
twinaphex 0489bc6196 Cleanups 2017-01-23 15:05:11 +01:00
twinaphex 82d894c205 Cleanups 2017-01-23 15:02:29 +01:00
twinaphex 716a409816 (database_info.c) Only do strdup if val_string is not empty 2017-01-10 23:15:26 +01:00
twinaphex bdc9bf68c6 Cleanups 2017-01-09 02:06:32 +01:00
twinaphex fac2557885 (database_info.c) Don't use non-enum function 2016-12-20 21:40:41 +01:00