Commit Graph

374 Commits

Author SHA1 Message Date
rlnilsen e71b6d6d23 Fix content scanner creating false positive playlist entries that also have wrong label and crc32. 2019-02-21 04:24:07 +01: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
twinaphex c98b2e2292 Buildfixes and more static code analysis warning fixes 2019-01-10 22:24:43 +01: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
Sven fc40e6ac85 fix gdi scanning - database only contains crcs for track 1 - so do not try to find largest track - just stop on track 1 2018-10-02 15:15:45 -04:00
twinaphex 6825cb2cc7 task_database.c - use string_is_equal 2018-09-20 12:48:00 +02:00
Brad Parker a1aefc901c Qt WIMP GUI 2018-04-30 14:33:05 -04:00
Rob Loach 00092eb5ea
feat: Add Wii Backup File WBFS scanning 2018-04-29 09:51:38 -04:00
twinaphex 041670fe02 Get rid of multitude of casting warnings 2018-04-13 00:47:42 +02:00
twinaphex 1751f4a0af Make it possible to read bigger files by replacing ssize_t with int64_t
and size_t with uint64_t
2018-04-13 00:18:11 +02:00
twinaphex c24179dc63 Scanning should now work in standalone program 2018-04-10 05:16:33 +02:00
twinaphex c9e48cd9de Cleanups / get rid of more dependencies 2018-04-10 04:31:19 +02:00
twinaphex 6f0fc2426d (database_info/task_database) Get rid of list_special dependencies 2018-04-10 04:13:45 +02:00
twinaphex 06bafe3cc3 Fix typo 2018-04-10 02:41:09 +02:00
twinaphex be0c118c87 (task_database.c) Don't use msg_hash_calcualte and msg_hash_to_file_type 2018-04-10 01:18:40 +02:00
twinaphex fdec9c50e0 (task_database.c) Add some RARCH_INTERNAL ifdefs 2018-04-09 19:26:49 +02:00
Twinaphex 08a54e45f2 Get rid of a lot of implicit conversions 2018-04-09 15:56:45 +02:00
twinaphex 0ee124582c Silence another Coverity warning 2018-02-02 21:53:58 +01:00
twinaphex 61ff51be2f Start using string_is_equal predominantly 2018-01-16 22:53:38 +01:00
gblues 0f7de204f7 Last batch of whitespace cleanup (post-rebase)
-- looks like a few files committed with DOS line endings
2017-12-12 00:24:46 -08:00
gblues 6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
twinaphex c4d8a8c800 Free after intfstream_close 2017-12-11 20:24:00 +01:00
twinaphex 61d3f90cae Add hint defines to libretro.h 2017-12-11 12:53:47 +01:00
twinaphex 38e6d2443f Change functions 2017-12-11 12:31:14 +01:00
twinaphex 8aa4d6d148 Move convenience functions to interface_stream.c 2017-12-11 12:23:40 +01:00
twinaphex 6897f9a987 Pass hints to intfstream_open_file 2017-12-11 12:20:06 +01:00
twinaphex 318f17c4cb Start using VFS API constant defines 2017-12-11 12:15:00 +01:00
twinaphex 2e979ec537 Replace function signatures of file_stream file functions 2017-12-10 22:25:38 +01:00
twinaphex d75c187c5b Don't show 'Scanning of Directory Finished' if we are scanning a
file instead
2017-11-27 07:04:52 +01:00
Brian Koropoff fb5e788c1e task_database: fix crash from Windows-incomptabile format string 2017-11-24 18:17:43 -08:00
Brian Koropoff bedf65e72e scanner: prioritize databases with recent matches
This should improve performance when scanning many files
in a row that all match against the same database, which is
the expectation.
2017-11-17 16:53:49 -08:00
Brian Koropoff b668193923 scanner: allow matching archives by member
This allows more flexible detection of content packaged as multiple
compressed files (e.g. MAME).
2017-11-17 16:53:49 -08:00
Jean-André Santoni bd17c11350 Fix gamecube scanning 2017-10-27 15:17:18 +07:00
Jean-André Santoni 2ddba6770d Start implementing gamecube scanning 2017-10-27 15:17:18 +07:00
Alcaro b97853a536 Rename STRING_REP_ULONG to STRING_REP_USIZE 2017-10-02 22:51:51 +02:00
twinaphex 3040d1da36 (task_database.c) Simplify conditionals 2017-09-30 06:21:38 +02:00
twinaphex bae31a318d Prevent memory leak 2017-09-29 21:32:05 +02:00
twinaphex 3490c3dbc5 Cleanups 2017-09-29 20:51:20 +02:00
twinaphex 3090f3ff3a (task_database.c) Rewrite char arrays 2017-09-29 20:47:54 +02:00
twinaphex 6cf6d46e4b Try silencing more warnings - do something with return value 2017-09-26 03:51:50 +02:00
twinaphex cc8e897222 C89_BUILD fixes 2017-09-22 05:12:26 +02:00
twinaphex 50d48139a3 Fix some more memory leaks 2017-09-21 23:38:29 +02:00
twinaphex 1a77c383b9 Fix plethora of memory leaks again 2017-09-21 21:33:13 +02:00
twinaphex 0f80e31382 task_database.c - cleanups 2017-09-21 19:57:10 +02:00
Twinaphex cff35f3611 Fix warning - wrong type used 2017-09-21 19:24:42 +02:00
twinaphex 0002912328 Change size of variables 2017-09-20 16:35:18 +02:00
twinaphex 808a723969 Fix memory leaks 2017-09-20 12:18:31 +02:00
twinaphex ac732ecdb0 Fix memory leak 2017-09-20 12:13:44 +02:00
twinaphex 37715114ae Cleanup 2017-09-20 09:55:53 +02:00
Aaron Oneal 4a929bd8e2 Optimize scanning using directory name hint
As discussed in issue #5440, directory scans are slow when compressed files must be checked against multiple databases. This commit adds support to hint to the scanner that a particular database should be used so that only a single scan is required. If the directory name being scanned matches the database name then that single database is selected.
2017-09-19 16:58:28 -07:00
Aaron Oneal 6ac4486f4d Fix typo from 9a76a93ea that broke the build 2017-09-19 16:49:45 -07:00
Twinaphex 9a76a93ea8 OSX buildfixes/cleanups 2017-09-19 21:37:51 +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 d4beeeda33 task_database: skip serials for the right file type! 2017-09-18 09:03:43 -07:00
Brian Koropoff 84edc8ffb0 task_database: prune files referenced from cue/gdi files
Since we use cue/gdi files to find the right track file to
scan, don't bother scanning them separately.
2017-09-18 09:03:43 -07:00
Brian Koropoff 6c1044a699 task_database: support GDI files 2017-09-18 09:03:43 -07:00
Brian Koropoff fa6d0fac67 task_database: more scanning rework
- Use the primary (largest data) track for CRC identification, as it
  seems least likely to be shared among multiple discs
- CRC the primary track when importing a loose .cue file.
- If multiple tracks are in the same file, CRC the correct chunk
2017-09-18 09:03:43 -07:00
twinaphex 49cf80db10 Fix resource leaks 2017-09-18 15:57:05 +02:00
Twinaphex 6648ebed0d Silence some warnings 2017-09-18 11:56:59 +02:00
Brian Koropoff 5a3969d4fa task_database: rework cd scanning
Support chd files.  Fall back to using the CRC32 of the last track
of CDs if a serial number is not available.  This requires new
database files, but is necessary for chd scanning to work.
2017-09-17 02:11:07 -07:00
twinaphex b51a19da5c Fix memory leak 2017-09-12 05:26:59 +02:00
twinaphex c1c42cac6b (task_database.c) Reduce stack usage 2017-09-12 05:00:22 +02:00
Aaron Oneal 48550235d5 Fix slow content scans.
The check for unsupported content was reversed which was causing files to be checked against every database. Correcting this improves performance drastically. This appears to have been broken since at least commit #fc1f2cdcf.
2017-09-06 20:51:37 -07:00
twinaphex 50b838d8ed Cleanups 2017-07-30 10:11:41 +02:00
Rob Loach bbb2a7d6f4
Add serial detection for Wii 2017-07-29 23:23:05 -04: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
aliaspider 634de19dc9 (WiiU) enable libretrodb. 2017-05-22 06:07:27 +01:00
aliaspider eede1a4978 no need to swap endianess here. 2017-05-22 05:26:13 +01:00
twinaphex 8eca08c6ac Start using string_is_equal_fast/string_is_not_equal_fast macros
instead of straight memcmp
2017-05-16 03:20:59 +02:00
twinaphex 80d9d1f143 Rewrite task_queue 2017-05-14 20:43:48 +02:00
twinaphex 72bd83b8d1 Cleanups to tasks_internal.h 2017-05-13 18:08:37 +02:00
twinaphex 42ebe7a7ad Merge runloop.c and retroarch.c 2017-05-11 09:11:46 +02:00
twinaphex f9bc2d3783 Use memcmp instead of string_is_equal where possible for
better performance
2017-04-21 22:47:15 +02:00
Jean-André Santoni ff575a3460 PCE-CD magic number detection 2017-03-07 01:16:58 +01:00
twinaphex 10bf8d4a8a Backport enlarge char buffers 2017-02-27 09:28:38 +01:00
twinaphex 96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
twinaphex a3f5590f41 remove dependence on configuration.h inside task_database.c 2017-01-18 01:23:24 +01:00
Twinaphex 2834370e09 Revert "allow serial scanner to match PBP" 2017-01-07 05:52:12 +01:00
radius 1866706c75 allow serial scanner to match PBP 2017-01-06 22:05:55 -05:00
twinaphex 6faabfeebf Don't use settings struct from thrading functions 2016-12-31 07:03:29 +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 958a028b0a (task_database.c) Remove unused message queue 2016-12-24 20:36:37 +01:00
twinaphex 77e5cdbfde Revert "Rename runloop_msg_queue_push to video_driver_msg_queue_push"
This reverts commit ad7386913c.
2016-12-22 23:36:11 +01:00
twinaphex ad7386913c Rename runloop_msg_queue_push to video_driver_msg_queue_push
and move code to video_driver.c
2016-12-22 13:15:02 +01:00
twinaphex c8dc0fef0c Cleanups - turn some functions into static functions and move
to task_database.c
2016-12-20 21:08:31 +01:00
twinaphex d0cc1afe0a (tasks) Style nits 2016-12-04 19:12:35 +01:00
Jean-André Santoni 6cc14a4fb9 Add missing copyright mention on some files 2016-10-27 18:17:43 +02:00
Brad Parker d1d5584d18 update copyright 2016-10-27 11:47:10 -04:00
Francisco José García García 8e329a2072 Merge pull request #3781 from frangarcj/master
(VITA) Working scanning content
2016-10-13 17:51:13 +01:00
Francisco José García García 4c19543427 (VITA) Workaround for scanning content 2016-10-13 18:00:40 +02:00
twinaphex a4b90bcede Set msg[127] = 0 2016-10-13 13:33:51 +02:00
Brad Parker 88c8c49ef8 skip scanning of compressed files within archives if the core attached to this database supports archive files themselves 2016-10-12 16:14:00 -04:00
twinaphex 481ebced22 Prevent implicit memsets 2016-10-09 09:56:03 +02:00
twinaphex 1388220866 (tasks) Don't do implicit memsets in crucial performance-oriented code 2016-10-08 18:31:43 +02:00
Brad Parker fc1f2cdcf4 only scan the content databases that support the file's extension 2016-10-03 16:09:10 -04:00
twinaphex c8dc941c42 iso_get_serial - cleanup 2016-09-29 11:10:52 +02:00
twinaphex a304b42f73 (task_database.c) Cleanup 2016-09-29 11:07:56 +02:00
twinaphex 1842e35b8d Cleanups 2016-09-29 11:03:59 +02:00
twinaphex cfe91125db Create database_info_get_current_element_name 2016-09-29 10:59:50 +02:00
twinaphex b286703a81 Cleanup task_database_handler 2016-09-29 10:55:50 +02:00
twinaphex 7e1639f33b Create database_info_set_type 2016-09-29 10:43:38 +02:00
twinaphex fc3c17547e Use database_info_get_type 2016-09-29 10:41:30 +02:00
twinaphex 24f34431ee Header include cleanups 2016-09-29 10:37:31 +02:00
Twinaphex 94b0dd36ab remove unused variable 2016-09-25 15:51:46 +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 3f35e10014 Solve some warnings pointed out by scan-build 2016-09-25 05:55:55 +02:00
twinaphex 55517dbc12 Prevent warning 2016-09-21 02:17:32 +02:00
Brad Parker b7735520f2 fix scanning of archive files 2016-09-20 15:40:29 -04:00
Brad Parker 6ac73c5655 use generic crc32 to scan files with 2016-09-20 13:34:56 -04:00
Brad Parker 992b87321a more archive paths 2016-09-19 21:06:23 -04:00
Brad Parker 137968c001 treat .apk files as .zip, set archive_path any time we need to decompress a file 2016-09-19 18:38:33 -04:00
twinaphex 6544b0bcd7 Get rid of HAVE_LIBRETRODB ifdefs 2016-09-18 21:50:39 +02:00
Brad Parker a7ffead8f6 fix more memory corruption 2016-09-18 15:20:27 -04:00
Brad Parker dc4760f5a6 fix another wrong type 2016-09-18 14:39:37 -04:00
Brad Parker f13bce4e50 - use the detected stream backend's crc32 function
- remove zlib/7zip ifdef from archive_file.c, task_content.c and task_database.c
- don't re-compute CRC from one stored in archive
2016-09-18 12:31:24 -04:00
Brad Parker 7c29fd6c33 create 7z archive backend, enables scanning of 7z content 2016-09-18 10:31:21 -04:00
twinaphex acd4dd527b Header include cleanups 2016-09-05 18:31:32 +02:00
twinaphex 397f82c9f5 Get rid of configuration.h dependency in list_special.c 2016-07-18 07:15:58 +02:00
twinaphex 21134eb28c Create FILE_PATH_DETECT 2016-06-30 06:07:44 +02:00
twinaphex fbc83640b6 More translatable strings 2016-06-30 05:58:05 +02:00
twinaphex 6756501dac Create FILE_PATH_LUTRO_PLAYLIST 2016-06-30 05:19:25 +02:00
Jean-André Santoni 0f18ade02a Add .lutro scanning
When a file wih the .lutro extension is found, the ROM is added to Lutro.lpl. The name of the game is the name of the file without the extension.
2016-06-29 15:07:12 +02:00
twinaphex ca3eecf5c0 Create fill_pathname_join_noext 2016-06-28 13:05:46 +02:00
twinaphex 2dddc3fc88 Add FILE_PATH_LPL_EXTENSION 2016-06-26 10:12:28 +02:00
twinaphex dee7533d65 (libretro-common) Start creating STRING_REP_ULONG 2016-06-23 07:37:02 +02:00
twinaphex c3eda56561 Move hashes over to msg_hash.c 2016-06-20 17:55:34 +02:00
twinaphex 68bf755fe7 Remove two unused hashes 2016-06-20 16:19:30 +02:00
twinaphex 2ebd6e6f49 Header cleanups 2016-06-20 06:34:30 +02:00
twinaphex 34ad3bd103 Cleanups 2016-06-03 05:24:21 +02:00
twinaphex 65d5ebc2bb Fix some dereference after null check warnings 2016-06-02 20:40:51 +02:00
twinaphex da6ac4aae7 Fix explicit NULL dereferenced warnings 2016-06-01 04:05:14 +02:00
twinaphex 7d26034ebe Rename rarch_task_* to task_* 2016-05-27 18:14:47 +02:00
twinaphex a98616b45b Fix explicit NULL dereferenced/dereference before null check warnings 2016-05-26 17:47:21 +02:00
twinaphex 57f797dad6 Cleanup 2016-05-21 13:16:48 +02:00
twinaphex 5555d18a52 Cleanup 2016-05-17 14:24:43 +02:00
twinaphex 449c7483cd Rename content_playlist_ to playlist_ 2016-05-16 09:07:44 +02:00
twinaphex 7c1938b674 Rename task functions 2016-05-13 10:19:53 +02:00
twinaphex 7dffc6286b Internally change directory settings 2016-04-28 19:26:02 +02:00
Jean-André Santoni 86cf3243aa Fix arcade LPL generation 2016-04-15 05:55:11 +07:00
Jean-André Santoni 4f74976cac Arcade scanning 2016-04-15 05:28:44 +07:00
twinaphex e41127459e Rename 'filestream' functions 2016-03-24 04:09:25 +01:00
twinaphex ac6362cae4 Combine list_special files 2016-03-20 17:28:24 +01:00
twinaphex 93b7dc1bdd (libretro-common) move 'lists' files to lists/ 2016-03-20 14:53:54 +01:00
twinaphex 4b9143430c Add C89 workaround 2016-02-25 22:26:48 +01:00
twinaphex f8b866c8c1 Combine file_ops.c and content.c 2016-02-15 21:49:29 +01:00
twinaphex 5b6d310abd Rename enums 2016-02-09 18:26:27 +01:00