Commit Graph

515 Commits

Author SHA1 Message Date
twinaphex cf71d465a3 Turn mkdir_norecurse into static function 2017-06-16 15:33:06 +02:00
twinaphex 6af5bd01bf Merge retro_stat and file_path 2017-06-16 15:00:11 +02:00
twinaphex 8d1e51af7c Make archive_file_7z.c less dependent on 7zip source files 2017-06-12 12:26:19 +02:00
aliaspider 934f7c58ba (WiiU) enable networking. 2017-05-23 10:24:23 +01:00
twinaphex 126a5bf121 Use string_is_equal_fast/string_is_not_equal_fast 2017-05-16 04:00:37 +02: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 5a9f6ad9b7 Try to prevent null pointer dereference 2017-05-09 20:45:09 +02:00
twinaphex e8c1c153d6 Prevent nULL pointer dereference 2017-05-08 22:55:45 +02:00
twinaphex f9bc2d3783 Use memcmp instead of string_is_equal where possible for
better performance
2017-04-21 22:47:15 +02:00
twinaphex 0c66441d08 (archive_file) Cleanups 2017-04-21 20:46:41 +02:00
twinaphex 271edb4ca1 We don't want uppercase for these instances 2017-04-21 14:26:35 +02:00
twinaphex 607ae71259 Turn string_is_equal_noncase into self-contained function 2017-04-21 14:17:47 +02:00
twinaphex dd517f4660 Try to avoid directly calling strcmp 2017-04-21 13:56:15 +02:00
twinaphex 82c62b1693 Use stdstring in more instances 2017-04-21 13:50:24 +02:00
twinaphex 824a619b90 Initialize db manually 2017-02-28 10:53:20 +01:00
Twinaphex ddae075733 Silence more warnings 2017-02-27 01:28:01 +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 712724e0ff (archive_file.c) Get rid of memsets 2017-02-20 02:12:39 +01:00
twinaphex 7c722fca9a (nbio_stdio.c) Try to prevent 'argument cannot be negative' coverity warning 2017-01-22 20:30:47 +01:00
Brad Parker a2d37adc53 Windows 95 does not have GetFileAttributesEx 2017-01-22 13:48:49 -05:00
twinaphex 64bb848daf Update headers (pt. 2 - libretro-common) 2017-01-22 13:58:20 +01:00
Josh Palmer ef205447df QNX-specific default directory and file permission handling 2017-01-09 20:26:09 +00:00
twinaphex a94c20713d Update copyright 2016-12-24 20:24:06 +01:00
twinaphex 9db910c049 Cleanup 2016-12-24 20:22:23 +01:00
twinaphex e328c4ebfa (archive_file.c) Cleanup 2016-12-21 01:47:32 +01:00
twinaphex 3561949a87 Get rid of some implicit memsets 2016-12-19 18:18:40 +01:00
twinaphex 4c9f2e41ff Get rid of some implicit memsets 2016-12-19 14:04:37 +01:00
twinaphex 89820220b7 (libretro-common) Cleanup/style nits for archive_file_{7z/zlib} 2016-12-19 00:12:24 +01:00
twinaphex 6935ce902e (archive_file.c) Cleanups/style nits 2016-12-17 17:19:32 +01:00
twinaphex 1ddd0ab1d3 (Statically linked RA) Make 'Open Archive' work when there are
no core info files
2016-12-17 17:12:53 +01:00
twinaphex feae0823ce Prevent some implicit memsets 2016-12-17 14:40:06 +01:00
twinaphex d4796caabd (libetro-common) Turn path_contains_compressed_file into a macro 2016-12-17 14:01:25 +01:00
twinaphex 96ffd8e025 Revert "Remove HAVE_COMPRESSION ifdefs in file_path.c"
This reverts commit 4103b70833.
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 39b41a1f51 file_archive_get_file_list - take out HAVE_COMPRESSION code 2016-12-17 11:59:19 +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 bd67208d74 Remove some unnecessary ifdefs for file_path.c 2016-12-17 11:16:43 +01:00
twinaphex 8042c2ac62 Move config_file_userdata.c to libretro-common 2016-12-12 12:36:46 +01:00
Brad Parker e39031cbd0 revert rest of unicode changes 2016-12-03 00:15:29 -05:00
Brad Parker f725b48555 starting to revert unicode changes 2016-12-03 00:15:29 -05:00
Brad Parker b69734ce4a more unicode fixes 2016-12-02 23:01:44 -05:00
Brad Parker d20acaa63d more unicode fixes 2016-12-02 23:00:27 -05:00
Brad Parker fcf09f10ef more unicode fixes 2016-12-02 22:12:00 -05:00
Brad Parker cc7bf6b4fa more unicode fixes 2016-12-02 21:11:55 -05:00
Brad Parker 3b8a81dd31 make existing hard-coded unicode calls switchable back to ansi 2016-12-02 14:34:29 -05:00
Brad Parker 3846ce1837 build fixes for MSVC, start moving back to TCHAR usage so we can switch unicode on and off 2016-12-02 12:54:39 -05:00
Brad Parker 367dea6723 unicode-ify a couple other windows files, start changing function names to W version explicitly 2016-11-29 20:32:24 -05:00
Brad Parker 8adafa9249 use UTF8/16 conversion functions instead of codepage ones 2016-11-29 14:34:36 -05:00
Brad Parker 495deae31b still not working 2016-11-29 14:34:36 -05:00
Brad Parker cd9d09d1f3 use unicode versions of windows functions 2016-11-29 14:34:35 -05:00
twinaphex 4029709658 Fix warning 2016-11-27 14:50:42 +01:00
Gregor Richards 096eb072e1 Replacing archive_file_zlib backend with trans_stream 2016-11-26 15:48:58 -05:00
Gregor Richards ac50e17f50 Moving zlib stream interface
Moving the zlib streaming interface out of archive_file and into
trans_stream, including updating the png support to use the new
trans_stream interface. archive_file_zlib itself still needs updating.
2016-11-26 10:47:24 -05:00
Twinaphex 73ec076160 Merge pull request #3878 from aliaspider/master
set config file streams to full buffering. dramatically reduces startup/
2016-10-28 02:57:05 +02:00
aliaspider fd43a460f4 set config file streams to full buffering. dramatically reduces startup/
shutdown latency on some devices with slow I/O access.
2016-10-28 01:49:53 +01:00
twinaphex 4fb6808321 libretro-common is MIT and we don't want individual copyright
per authors here; RetroArch is GPL and it's fine there
2016-10-27 19:52:58 +02:00
twinaphex 88e88e92f3 Prevent crash with zipped roms 2016-10-27 19:50:19 +02:00
Brad Parker d1d5584d18 update copyright 2016-10-27 11:47:10 -04:00
twinaphex 6310f53587 Prevent some implicit memsets and reduce the size of some
char variables
2016-10-27 10:45:53 +02:00
twinaphex 053208676f Prevent null pointer dereference 2016-10-26 09:55:09 +02:00
twinaphex df87fc7043 Cleanups - prevent implicit memsets 2016-10-16 02:00:59 +02:00
Brad Parker f0d1a733e3 fix 7z extraction endless loop 2016-10-11 02:07:21 -04:00
twinaphex 481ebced22 Prevent implicit memsets 2016-10-09 09:56:03 +02:00
twinaphex 5f5571e241 (libretro-common) don't do implicit memset 2016-10-08 20:04:48 +02:00
aliaspider e9618dd6a0 (3DS) opendir with an empty string isn't returning NULL as it should. 2016-10-04 19:40:36 +01:00
twinaphex a1c2036769 Create samples/file/nbio 2016-09-29 21:28:56 +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 dac5b1aabd Fix warning 'dereference after null' 2016-09-23 02:05:12 +02:00
twinaphex d641930baf Fix statement is unreachable warning 2016-09-22 23:10:11 +02:00
Brad Parker d493273bcf use first extracted file if one is not specified and !need_fullpath and !block_extract 2016-09-22 16:03:31 -04:00
twinaphex 1a55721c78 Fix some high-priority Coverity-catched defects 2016-09-20 16:10:27 +02:00
twinaphex 14b297b144 Simplify file_archive_file_list_new 2016-09-20 03:25:34 +02: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 bfeb0111f8 Fix C89_BUILD errors 2016-09-19 18:29:10 +02:00
twinaphex 871621fdfa Move implementation file_archive_file_data to archive_file.c 2016-09-19 18:26:16 +02:00
Brad Parker fb26f3bbb7 fix divide by zero, use non-opaque type for file_archive functions 2016-09-19 12:06:07 -04:00
Twinaphex 3642764064 (archive_file.c) fix warning 2016-09-19 13:30:29 +02:00
Brad Parker 0899cd091e fix selecting 7z archive files other than the first one 2016-09-19 02:43:09 -04:00
Brad Parker 653f5fe96c remove debug prints 2016-09-18 21:22:13 -04:00
Brad Parker 2a75b88d89 file_archive_extract_first_file can choose any file now 2016-09-18 21:22:13 -04:00
Brad Parker 162efd86dc uncompressed 7z files do not have a compressed size 2016-09-18 17:37:39 -04:00
twinaphex d25cace9ed Add config_file_exists 2016-09-18 21:55:53 +02:00
Brad Parker a7ffead8f6 fix more memory corruption 2016-09-18 15:20:27 -04:00
twinaphex bd1eebc579 Nit 2016-09-18 19:07:48 +02:00
Brad Parker 25105ed565 upstream merge 2016-09-18 12:52:20 -04:00
Brad Parker dbbd49f9f9 merge with master, remove alignment test code 2016-09-18 12:44:00 -04:00
twinaphex 93738fae9f CXX_BUILD fix 2016-09-18 18:34:59 +02: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
twinaphex c2e2d41452 C89_BUILD fixes 2016-09-18 18:28:33 +02:00
twinaphex 4e32fb0fd7 Update archive_file.c 2016-09-18 18:23:14 +02:00
Twinaphex 61c3de1f6a Griffin buildfixes 2016-09-18 16:49:09 +02:00
Brad Parker 7c29fd6c33 create 7z archive backend, enables scanning of 7z content 2016-09-18 10:31:21 -04:00
Alcaro 5aa0628ebf Kill an overflow or two. Or twelve. 2016-09-04 18:12:03 +02:00
Brad Parker ae36b0f73d 7z extension is .7z not .zip 2016-08-30 16:31:53 -04:00
radius cb25a9e4b8 should fix other platforms 2016-08-27 23:39:47 -05:00
radius 7092c0dbf4 windows build fix 2016-08-27 22:59:47 -05:00
Alcaro 9ffffcd249 Fix missing header 2016-08-26 18:29:41 +02:00
Brad Parker 6eebbfd8ae use const delimiter and remove pointer arithmetic 2016-08-26 11:36:52 -04:00
Twinaphex 7edf762ac6 Merge pull request #3426 from bparker06/hash_filename
correctly handle content paths containing a hash (#), fixes issue #3273
2016-08-26 17:20:43 +02:00
Brad Parker 89f9b096e7 style cleanup and fix typos 2016-08-25 21:40:37 -04:00
Brad Parker 097f326298 simplify delimiting of compressed archive filenames 2016-08-25 16:18:29 -04:00
Alcaro 0bd9ccddc1 false is most certainly not 1. 2016-08-25 12:02:42 +02:00
Brad Parker 5275c0a45d correctly handle content paths containing a hash (#), fixes issue #3273 2016-08-24 16:54:10 -04:00
Alcaro be4e0aee1f Clean up this thing 2016-08-20 21:23:32 +02:00
twinaphex 7f3e63a18d config_set_string - prevent potential crash 2016-08-20 21:21:09 +02:00
meleu db204afc9c changes based on the @Alcaro suggestions
Suggestions made here: https://github.com/libretro/RetroArch/pull/3407
2016-08-19 16:31:13 -03:00
meleu c92efacebe avoid problems if ROM name has percents
As @Alcaro noted here: https://github.com/libretro/RetroArch/pull/3407
2016-08-19 10:13:33 -03:00
meleu 4e44ab99a1 added fill_str_dated_filename() function
This function creates a 'dated' filename prefixed by the string `in_str`, and concatenates extension (`ext`) to it.
2016-08-19 08:45:58 -03:00
Alcaro 4ce3683333 Fix indentation derp 2016-08-17 13:53:41 +02:00
Alcaro 43a6a667be We don't need this one. 2016-08-08 19:14:00 +02:00
twinaphex a532bc2b0e (PS3 Salamander) Silence unused variable warning 2016-07-24 11:33:44 +02:00
twinaphex 45c33c7acf Create fill_pathname_base_ext 2016-07-01 11:12:24 +02:00
twinaphex 83bafe1b19 Cleanups 2016-06-30 05:04:27 +02:00
twinaphex 5f71ecc1d1 Create fill_pathname_join_special_ext 2016-06-30 04:59:57 +02:00
twinaphex 3f8b1d04ed Reuse code 2016-06-29 18:54:40 +02:00
twinaphex 668b4b5d26 Remove duplicate fill_string_concat 2016-06-29 18:14:42 +02:00
twinaphex a7e8707f7d Create fill_pathname_join_delim_concat 2016-06-29 17:51:25 +02:00
twinaphex c38c28a0f5 Create fill_pathname_join_concat 2016-06-29 17:46:50 +02:00
twinaphex f4ef5e82c2 Create and use fill_string_concat 2016-06-29 17:41:32 +02:00
twinaphex 7647c9be59 Add noext versions 2016-06-28 13:08:03 +02:00
twinaphex ca3eecf5c0 Create fill_pathname_join_noext 2016-06-28 13:05:46 +02:00
twinaphex c03e566eba Create filL_short_pathname_representation_noext 2016-06-28 12:49:37 +02:00
twinaphex 0709f2b11b (libretro-common) (file_path.c) Cleanups 2016-06-28 12:43:50 +02:00
aliaspider 5a80bd6b30 (VITA) build fix for latest sdk. 2016-06-05 22:01:25 +01:00
twinaphex d95c421ba9 (config_file.c) Cleanups 2016-06-03 07:52:57 +02:00
twinaphex d40eade52c Create filestream_getline 2016-06-03 07:09:50 +02:00
twinaphex e9cf351c67 Move settings around for User Interface -
(config_file) Try to get rid of forward declarations
2016-06-03 06:43:11 +02:00
twinaphex 5eb43846da Prevent explicit NULL dereferenced warnings 2016-06-01 04:14:48 +02:00
twinaphex 03ded43280 Prevent explicit null dereferenced warnings 2016-05-26 18:09:46 +02:00
twinaphex 8f7e253f1f (config_file.c) Fix control flow issue 2016-05-24 14:20:03 +02:00
twinaphex ac407588fa Include stdstring.h 2016-05-24 01:08:01 +02:00
radius 86b5b361da fix the last commit 2016-05-23 18:06:50 -05:00
radius 9300313fce fix lockup
this seems to fix a lockup that happens randomly on windows at startup, content load/content unload/controller hotplug
2016-05-23 17:57:15 -05:00
twinaphex 377f09f12a Change back retro_dirent_is_dir to hopefully avoid sshfs issues
- more rigorous testing should be applied before changing these
functions
2016-05-11 18:54:22 +02:00
Andre Leiradella b38e234d2e made find_last_slash public 2016-05-05 16:22:35 -03:00
twinaphex d4a50935d2 C89_BUILD fix 2016-04-27 10:58:38 +02:00
twinaphex 08b7ac500b (libretro-common) Updates 2016-04-23 10:40:46 +02:00
twinaphex ac18671ead Update libretro-common 2016-04-22 05:28:49 +02:00
twinaphex 8ba1f2fca6 (libretro-common) archive_file_zlib.c - cleanup 2016-04-08 02:54:37 +02:00
twinaphex e88e580832 (libretro-common) archive_file.c - Cleanups 2016-04-08 02:51:17 +02:00
twinaphex e41127459e Rename 'filestream' functions 2016-03-24 04:09:25 +01:00
twinaphex c8f4d97839 Move config_file_userdata outside libretro-common 2016-03-21 18:49:50 +01:00
twinaphex 32a8b57826 Move test files 2016-03-21 18:27:02 +01:00
twinaphex 972d3faabb (libretro-common) Cleanups 2016-03-20 17:15:40 +01:00
twinaphex f55ee11554 (libretro-common) Header updates 2016-03-20 17:13:31 +01:00
twinaphex 3720cf87e7 Rename retro_file to file_stream 2016-03-20 16:29:14 +01:00
twinaphex be9bf7dc44 (libretro-common) Move memory_stream 2016-03-20 16:17:44 +01:00
twinaphex c7e13e2bcd (libretro-common) Rename file_archive to archive_file 2016-03-20 16:14:40 +01:00