Brad Parker
228049df11
7zip: only use Unicode file open on Windows
2018-01-02 20:48:19 -05:00
bparker06
c51b107d9c
Update archive_file_7z.c
2018-01-02 20:24:48 -05:00
Brad Parker
54e7ec8e79
win32: use Unicode file I/O for 7zip archives when available
2018-01-02 20:21:55 -05:00
twinaphex
d1ad5c336e
Silence warnings
2018-01-02 06:28:05 +01:00
Alcaro
e0eb5e698e
We'll want a test suite at some point, here's the first test
2018-01-01 20:55:26 +01:00
Alcaro
a79b3250ce
why is -common trying to call out of -common
2018-01-01 20:42:10 +01:00
twinaphex
07f13876fc
Fix playlist issues with extract_value - the name of the last playlist
...
entry in history list was being reused for the next playlist entry
2018-01-01 20:17:41 +01:00
twinaphex
21c1acac73
Prevent another Coverity warning - memory corruption
2018-01-01 17:24:00 +01:00
twinaphex
b279dfcb64
Simplify extract_value
2018-01-01 16:45:18 +01:00
twinaphex
515918f80c
config_file.c - fix Coverity warning - resource leak of
...
path
2018-01-01 16:37:20 +01:00
twinaphex
e566a5591b
Revert "Revert config_file.c"
...
This reverts commit 2f422a457f
.
2018-01-01 07:45:57 +01:00
twinaphex
f2ddc8eff0
Revert "Simplify config_file_write"
...
This reverts commit a4500eeafc
.
2018-01-01 07:45:56 +01:00
twinaphex
20122d21ee
CXX_BUILD buildfix
2017-12-30 08:12:38 +01:00
Brad Parker
a3a5f6e07e
win32: add Unicode versions of getenv, GetModuleFileName, LoadLibrary and _mkdir
2017-12-27 02:55:53 +00:00
twinaphex
a4500eeafc
Simplify config_file_write
2017-12-20 17:07:31 +01:00
twinaphex
2f422a457f
Revert config_file.c
2017-12-20 02:52:01 +01:00
Alcaro
b7249525d4
guess drunk is better than untested
2017-12-19 00:13:19 +01:00
Alcaro
b2d5fad4f5
strtok is drunk
2017-12-19 00:08:25 +01:00
twinaphex
c6217ef14b
(file_path.c) Get rid of libretro.h dependency
2017-12-14 20:06:15 +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
Brad Parker
8c0adf3594
move path_file_rename and path_file_remove into VFS
2017-12-14 13:32:26 -05: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
61d3f90cae
Add hint defines to libretro.h
2017-12-11 12:53:47 +01:00
twinaphex
318f17c4cb
Start using VFS API constant defines
2017-12-11 12:15:00 +01:00
twinaphex
e1461cc0de
Get rid of hashes in config_file.c
2017-12-11 11:40:36 +01:00
twinaphex
2fd8210e59
Create shareable filestream_getline
2017-12-10 22:35:08 +01:00
twinaphex
2e979ec537
Replace function signatures of file_stream file functions
2017-12-10 22:25:38 +01:00
twinaphex
95cc8e12d2
Get rid of RFILE_MODE_READ_TEXT dependency for config file/playlist
2017-12-10 21:28:13 +01:00
Alcaro
e07ed18105
Fix text mode dependency
2017-12-10 21:00:24 +01:00
Brad Parker
1a928b9c50
omit extra slash at end of path, Win95/98 doesn't like them
2017-12-09 16:38:33 -05:00
Brad Parker
49d0299808
LEGACY_WIN32: check for target of less than Win2K instead of < vc2005, since Win98 does not support Unicode
2017-12-04 22:49:08 -05:00
Alcaro
a6ef704369
Update config_file.c
2017-12-04 16:47:27 +01:00
twinaphex
059354de2f
Cleanup for config_file_write
2017-12-04 16:26:28 +01:00
Alcaro
ff4dca86f9
Turns out this is char*, let's cast because CXX_BUILD wants that
2017-12-04 15:01:58 +01:00
Alcaro
300052626f
Use FILE* all the way
...
Fixes platforms where RFILE isn't using the FILE* backend, needed for #5664
2017-12-04 14:30:32 +01:00
twinaphex
9558e569f1
We can still make use of this for PowerPC Mac
2017-12-04 05:56:03 +01:00
twinaphex
f53093de4d
Default to nbio stdio for PowerPC Mac
2017-12-04 03:12:45 +01:00
twinaphex
97529ade6e
OSX PowerPC might not define O_CLOEXEC
2017-12-04 02:48:08 +01:00
twinaphex
2203deb499
Need to include config.h here
2017-11-30 03:43:51 +01:00
twinaphex
6ed5a911d7
Create path_mkdir_error
2017-11-28 08:59:33 +01:00
Brad Parker
ae6892a89a
nbio: buildfix for Windows versions older than 2000
2017-11-27 17:48:07 -05:00
Alcaro
a96e3e1ead
fix missing %s
2017-11-27 17:16:22 +01:00
Alcaro
4fb12c4bd3
#5802
2017-11-27 17:09:16 +01:00
orbea
768b1b433c
libretro-common: Silence redefined warning.
2017-11-26 20:14:06 -08:00
twinaphex
00d57af005
C89_BUILD fixes
2017-11-26 22:53:42 +01:00
twinaphex
e35394d4bd
Fix MSVC 2003 build
2017-11-26 22:41:34 +01:00
Alcaro
3fa035ba2a
This include doesn't go here
2017-11-25 20:25:59 +01:00
twinaphex
369be389f4
Don't need HAVE_MMAP for linux
2017-11-25 18:42:12 +01:00
Twinaphex
ff7a244f5b
use Unix mmap for OSX/macOS now
2017-11-25 18:39:09 +01:00
twinaphex
e78ec12973
Can't have redefinitions of nbio_t in Griffin
2017-11-25 18:33:22 +01:00
twinaphex
fe12e079bb
Reimplement NBIO windows mmap
2017-11-25 17:38:37 +01:00
twinaphex
72b157bfcd
DOn't rely on HASVE_MMAP for nbio_windowsmmap.c
2017-11-25 07:26:06 +01:00
twinaphex
0485bab0ef
Add HAVE_CONFIG_H to nbio_intf.c
2017-11-25 06:15:30 +01:00
twinaphex
d4c3108b88
Implement new nbio interface implementations
2017-11-25 05:51:33 +01:00
twinaphex
7a772b9cd4
Create nbio_intf.c
2017-11-25 05:35:55 +01:00
twinaphex
81e543a4c9
Cleanups
2017-11-25 05:21:35 +01:00
twinaphex
64a6d6f184
Turn nbio_windowsmmap.c Unicode compatible
2017-11-25 05:18:30 +01:00
twinaphex
395e84ede2
Style nits
2017-11-25 02:18:24 +01:00
twinaphex
ac651b7581
Cleanups
2017-11-25 02:12:15 +01:00
twinaphex
0f6c453428
Cleanups
2017-11-25 02:10:04 +01:00
Alcaro
5999999cd3
Add Linux-native nbio too
2017-11-24 23:56:05 +01:00
Alcaro
5a6aad3dc7
Add mmap nbio for Windows too
2017-11-24 22:43:22 +01:00
Alcaro
7817ba2340
Add ugly check
2017-11-24 22:14:03 +01:00
Alcaro
053fbd6f27
Add mmap-based nbio implementation (which is too fast for the tests but otherwise passes)
2017-11-24 22:08:57 +01:00
twinaphex
92ea40d96e
Fix edge case when file is empty
2017-11-24 21:39:10 +01:00
Brad Parker
07f3919811
only call setvbuf right after opening file, and use our own buffer for C89 compliance
2017-11-17 02:28:45 -05:00
twinaphex
b05b27bff6
config_file.c - cleanups
2017-11-07 08:08:22 +01:00
twinaphex
13e0bd1932
Change function signature of file_path_rename
2017-11-06 19:17:42 +01:00
twinaphex
e5d4e2ac0a
Silence a lot of warnings
2017-11-06 19:13:54 +01:00
twinaphex
451dc774b0
Update libretro-common
2017-11-06 05:26:07 +01:00
Rob Loach
e29e8d9c62
Fix for included 7zip headers
2017-11-04 16:21:02 -04:00
Brad Parker
68a8198e4a
convert more file IO functions to use filestream, fixes encoding issues on Windows
2017-10-29 12:08:24 -04:00
Brad Parker
1842471eb1
use filestream_open to check if a file exists
2017-10-28 16:00:51 -04:00
Brad Parker
f3aceefe84
win32: use W-functions for nbio file IO too
2017-10-18 12:30:44 -04:00
twinaphex
f8a60b2b76
Create LEGACY_WIN32 ifdef
2017-10-16 01:51:59 +02:00
twinaphex
8464ad30bd
(Xbox 360) Buildfixes
2017-10-16 01:33:17 +02:00
Brad Parker
1b1d5c468d
win32: use unicode functions for file IO if supported
2017-10-15 17:41:34 -04:00
Brad Parker
a7c8cc88e5
win32: support local multibyte encoding for file paths
2017-10-14 23:13:24 -04:00
twinaphex
8238545bef
Cleanups
2017-10-04 06:53:47 +02:00
twinaphex
702f1276d6
Silence warnings
2017-10-03 00:53:09 +02:00
Alcaro
c91c4ff9c0
Nuke some more ifdefs and warnings
2017-10-03 00:35:41 +02:00
twinaphex
5379b12e7c
FIx some new Coverity errors
2017-09-29 05:39:06 +02:00
Alcaro
3374b0ffde
Add why we're doing this
2017-09-29 04:04:51 +02:00
twinaphex
8eb28eaae9
Add this for Wiiu debugging
2017-09-29 04:03:13 +02:00
twinaphex
0f1d0ebfa9
config_file.c - use malloc instead of calloc
2017-09-29 03:56:33 +02:00
twinaphex
df60512a0d
Cleanup our dep version of 7zip - we don't want non-stdint types.
...
Other misc. cleanups
2017-09-21 19:23:09 +02:00
Brad Parker
07566c51a1
VC6 buildfixes, add Makefile.griffin target for it
2017-09-07 11:50:10 -04:00
Brad Parker
0a1b3fedc0
VC6 support (targets NT 3.51)
2017-09-06 23:03:02 -04:00
Brad Parker
1204715525
msvc throws debug assert with fopen on a null string
2017-09-03 23:52:58 -04:00
twinaphex
c7e6f19920
Cleanup retro_dirent_is_dir
2017-08-06 14:21:18 +02:00
twinaphex
e3192ad3c5
Get rid of some incompatible implicit declaration warnings
2017-08-06 13:55:32 +02:00
twinaphex
3a141cb891
Create retro_dirent_include_hidden
2017-07-04 04:09:45 +02:00
twinaphex
2fda0b7e66
Simplify retro_dirent
2017-07-04 03:30:53 +02:00
twinaphex
4813019c58
Cleanup
2017-06-28 07:53:05 +02:00
twinaphex
25c18bb3ce
(config_file.c) Cleanups
2017-06-28 06:41:58 +02:00
twinaphex
8fbcf34e02
Cleanup config_file.c
2017-06-28 06:25:32 +02:00
twinaphex
ddb4867c52
(file_path.c) Cleanups
2017-06-28 04:51:58 +02:00
twinaphex
e1041030a2
Get rid of stdstring.h dependency for file_path.c
2017-06-28 04:44:33 +02:00
twinaphex
50b07ad8c4
Move retro_le to archive_file_zlib.c
2017-06-28 04:20:52 +02:00
twinaphex
d3868cc06f
Get rid of retro_assert usage in file_path.c
2017-06-26 05:33:47 +02:00
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
twinaphex
93b7dc1bdd
(libretro-common) move 'lists' files to lists/
2016-03-20 14:53:54 +01:00
twinaphex
b40b169098
Copy over libretro-common changes
2016-03-20 04:49:59 +01:00
twinaphex
ea7cf9d9ca
(file_archive.c) Style nits
2016-03-20 04:21:47 +01:00
twinaphex
7d346d627f
Robustness fixes
2016-02-29 01:22:39 +01:00
twinaphex
cec6701c0d
(config_file.C) Fix segfaultthat happened at freeing of tmp->key
...
when tmp->key is NULL
2016-02-28 18:44:07 +01:00
twinaphex
1516ee8e76
Silence this warning too for C89 - not correct but whatever -
...
never used
2016-02-25 22:36:08 +01:00
radius
80845f1cd6
save only modified values when saving remaps
2016-02-09 23:39:16 -05:00
twinaphex
eb5986d332
Cleanup
2016-01-30 04:43:35 +01:00
twinaphex
c5597d3c9d
Cleanups
2016-01-26 05:59:52 +01:00
twinaphex
f89467ccbf
Create fill_string_join
2016-01-26 01:46:15 +01:00
twinaphex
e386bc4963
Cleanup
2016-01-26 01:27:23 +01:00
twinaphex
b7434c6564
Rename to file_archive_decompress_data
2016-01-25 02:52:03 +01:00
twinaphex
9459cf6445
Rename zlib_ to file_archive_
2016-01-24 22:17:11 +01:00
twinaphex
44ec82362e
Cleanup
2016-01-24 22:06:01 +01:00
twinaphex
6878aa0844
Turn file_archive_inflate_data_to_file into static function
2016-01-24 22:04:21 +01:00
twinaphex
aae1faf76f
Move crc32_calculate to file_archive_zlib.c
2016-01-24 21:50:28 +01:00
twinaphex
d53a0c5994
Cleanup
2016-01-24 21:36:01 +01:00
twinaphex
6580c817c2
Cleanup
2016-01-24 21:31:47 +01:00
twinaphex
2bc75715f7
Move zlib_deflate_init to file_archive_zlib.c
2016-01-24 21:26:02 +01:00
twinaphex
1a04bb4532
Add stream_decompress_data_to_file_init and stream-decompress_data_to_file_iterate to
...
file_archive_zlib.c
2016-01-24 21:23:33 +01:00
twinaphex
c1364648e7
Cleanup
2016-01-24 21:12:16 +01:00
twinaphex
7130f0c8d8
Move zlib_set_stream to file_archive_zlib
2016-01-24 21:06:53 +01:00
twinaphex
7d29929819
Move file_archive_inflate_init to file_archive_zlib
2016-01-24 20:18:52 +01:00
twinaphex
fa00f51e80
Move zlib_deflate_data_to_file to file_archive_zlib.c
2016-01-24 20:15:17 +01:00
twinaphex
d1ef6f032e
Create stream_compress_free and add it to file_archive_zlib
2016-01-24 20:12:12 +01:00
twinaphex
f264d3d29b
Move zlib_stream_ functions to file_archive_zlib.c
2016-01-24 20:08:57 +01:00
twinaphex
064c5ffc3a
Move zlib_stream_free to file_archive_zlib.c
2016-01-24 20:01:35 +01:00
twinaphex
9a23d95846
Add zlib_stream_new to file_archive_zlib.c
2016-01-24 19:57:31 +01:00
twinaphex
021d8e6af8
Make file_archive_get_default_file_backend public scope
2016-01-24 19:48:25 +01:00
twinaphex
6f3adc900d
Style nits
2016-01-24 19:44:18 +01:00
twinaphex
c4fa71ecc3
Move functions
2016-01-24 19:29:34 +01:00
twinaphex
3e3b57200a
Cleanup
2016-01-24 19:25:30 +01:00
twinaphex
14e389bccf
Improve ZLIB_TRANSFER_DEINIT case
2016-01-24 19:16:26 +01:00
twinaphex
b4b686fdff
Cleanups/style nits
2016-01-24 19:10:02 +01:00
twinaphex
5c2acea38c
Do 'free' on handle->stream in case of an error in file_archive_inflate_data_to_file_init
2016-01-24 18:55:50 +01:00
twinaphex
cc69cfe6a7
Use zlib_transfer_t * instead of void *
2016-01-24 18:53:37 +01:00
twinaphex
cf94c0b6c0
Move file backend back to file_archive.c
2016-01-24 16:18:18 +01:00
twinaphex
3c2a45d923
Rename file_extract functions
2016-01-24 07:42:46 +01:00
twinaphex
552e78c9bc
Rename file_extract to file_archive
2016-01-24 07:29:11 +01:00
twinaphex
09e5dc9c50
Cleanup
2016-01-24 06:55:26 +01:00
twinaphex
5c615f18e1
Turn zlib_inflate_init2 into static function
2016-01-24 06:52:14 +01:00
twinaphex
280e10195c
Remove zlib_crc32_adjust - reuse zlib_crc32_calculate for this
2016-01-24 06:50:18 +01:00
twinaphex
c6f7afbd9a
Adjust zlib_crc32_calculate
2016-01-24 06:47:06 +01:00
twinaphex
a0e9a4c68e
Cleanups
2016-01-24 06:42:57 +01:00
twinaphex
78feccd0a3
Split up file extract zlib driver code to separate file
2016-01-24 06:18:53 +01:00
twinaphex
458e3a0fad
Fix zlib_extract_first_content_file - we now pass a
...
new string to zlib_extract_first_content_file which will
fill in the extracted first file's path, we then add this
to temporary_content string list
2016-01-24 05:41:41 +01:00
twinaphex
b4956ac7c1
zlib_get_file_list- cleanup
2016-01-23 23:02:16 +01:00
twinaphex
9c131dfaad
Cleanup
2016-01-23 23:00:35 +01:00
twinaphex
365b27caac
Simplify zip_extract_cb
2016-01-23 22:57:21 +01:00
Alcaro
2ffe03f732
Fix creepy type error.
2016-01-18 23:24:22 +01:00
twinaphex
6ff544ba1a
Update libretro-common
2015-12-31 15:28:46 +01:00
twinaphex
68d66be389
C89_BUILD fixes
2015-12-26 08:13:33 +01:00
Higor Eurípedes
5cbcd90707
(retro_file.c) Get rid of uneeded error messages in retro_read_file()
...
fseek/ftell lie about the file size in some filesystems (like sysfs) and
this makes the function complain about incomplete read when the file has
been fully read.
2015-12-23 21:20:26 -03:00
Higor Eurípedes
f386c9b7f9
(file_extract) Fix invalid read in zlib_parse_file_progress()
2015-12-05 20:57:04 -03:00
Higor Eurípedes
a171f3c6d1
(task_decompress.c) Add progress report
2015-11-30 10:41:35 -03:00
twinaphex
40e8f4eba6
Dehardcode C89_BUILD ifdefs
2015-11-25 02:10:31 +01:00
twinaphex
074f14b132
Add verbosity.c/verbosity.h
2015-11-23 12:03:38 +01:00
Alcaro
888ba881ec
No need to free a known null...
2015-11-20 16:33:21 +01:00
Alcaro
4b96b5814f
Fix some weirdness down here.
2015-11-20 16:30:55 +01:00
twinaphex
1e006e3edc
Comment out config_get_uint64 when compiling for C89
2015-11-19 13:52:40 +01:00
Higor Eurípedes
24d0f40959
(retro_file) Small cleanup in fopen()
2015-11-15 20:49:04 -03:00
twinaphex
74464f1843
retro_file.c - CXX_BUILD buildfix
2015-11-15 22:58:31 +01:00
twinaphex
149d892910
Cleanup config_file.c
2015-11-15 22:28:57 +01:00
Higor Eurípedes
c2eac57529
(retro_file) Fix fseek()
2015-11-15 10:42:38 -03:00
Higor Eurípedes
e0e48e8d3e
Fix console builds
2015-11-14 20:47:20 -03:00
Higor Eurípedes
f527f6466f
(libretro-db) Fix build
2015-11-14 19:44:08 -03:00
Higor Eurípedes
72aa4f951c
(retro_file) Fix undefined symbols on win32
2015-11-14 17:08:16 -03:00
Higor Eurípedes
0af8b9c731
(retro_file) Fix retro_fwrite()
2015-11-14 17:08:16 -03:00
Higor Eurípedes
dac22cf95b
(retro_file) Make mmap fseek()/fread() a little more POSIX/ISO-C compliant
2015-11-14 16:03:49 -03:00
Higor Eurípedes
eb7b46c7c1
(retro_file) Implement RFILE_HINT_MMAP
2015-11-14 16:03:49 -03:00
Higor Eurípedes
533f41259a
(retro_file) Implement RFILE_HINT_UNBUFFERED
2015-11-14 16:03:49 -03:00
Yongwoon Cho
ca9b7c141b
Fix: iOS cannot go to parent directory.
2015-11-05 05:45:01 +09:00
Yongwoon Cho
9ba6877772
Fix: iOS cannot go to parent directory.
2015-11-05 05:43:13 +09:00
Yongwoon Cho
21944b2e11
Fix: iOS cannot go to parent directory.
2015-11-05 02:43:35 +09:00
Twinaphex
6f0e632f36
Get rid of dir_list_obj.m for iOS
2015-10-26 22:42:31 +01:00
twinaphex
02a43c6b2a
Change 'rarch' to 'retro' namespace in libretro-common
2015-10-26 03:18:13 +01:00
twinaphex
1943ccacfb
Don't use compat/strl.h for OSX/iOS either
2015-10-26 00:29:16 +01:00
twinaphex
5ea75b616f
Don't use compat/posix_string.h for OSX/iOS
2015-10-26 00:21:37 +01:00
twinaphex
d19477edc5
(libretro-common) Update
2015-10-25 21:12:54 +01:00
twinaphex
c96976083e
Compile retro_stat as C
2015-10-25 20:57:38 +01:00
twinaphex
4b41ea60a0
Fix CXX_BUILD
2015-10-25 20:40:47 +01:00
twinaphex
14e46e0048
Remove menu_list_get_alt_at_offset
2015-10-18 21:54:20 +02:00
aliaspider
3879e2a7e7
(CTR/3DS) mkdir_norecurse: correct directory exists being treated as an
...
error.
2015-10-05 22:20:06 +01:00
twinaphex
56309b1f19
(retro_stat.c) Should hopefully fix this now
2015-10-03 01:46:16 +02:00
twinaphex
61a630fabe
GetFileAttributesEx returns 'zero' in case of an error
2015-10-03 01:01:57 +02:00
twinaphex
85be9b907d
(retro_stat.c) initialize variable
2015-10-02 18:26:01 +02:00
twinaphex
8f67989bf1
(retro_dirent.c) Don't need posix_string for retro_dirent
2015-10-02 18:03:30 +02:00
twinaphex
ba1ef9c3c2
(MSVC) Buildfixes
2015-10-02 17:57:37 +02:00
twinaphex
80e129d696
Forgot to change it to GetFileAttributesEx
2015-10-02 03:40:20 +02:00
twinaphex
a99183e425
(Windows) Attempt implementing reading the file size without
...
relying on stat
2015-10-02 03:06:13 +02:00
twinaphex
4c27cd6b5c
Attempt to fix Win32 port - path_stat/path_get_size
2015-10-01 07:25:00 +02:00
twinaphex
1a2da93c9c
path_get_size - change non-portable ssize_t to int32_t
2015-10-01 02:40:54 +02:00
twinaphex
90549903b7
(retro_stat.c) Implement path_get_size
2015-10-01 02:23:00 +02:00
twinaphex
0ef40d7819
(retro_file.c) Get rid of dependency on posix_string.h
2015-09-30 03:57:39 +02:00
twinaphex
9d9e90e672
(libretro_common) Fix retro_stat - put it inside extern C block
2015-09-30 03:41:01 +02:00
twinaphex
87d44af218
Static code analysis cleanups
2015-09-29 18:08:33 +02:00
Francisco José García García
1945b7e76d
(Vita) Fix creating directories
2015-09-29 00:40:00 +02:00
twinaphex
0cc56e2a1a
More static code analysis nits
2015-09-28 18:44:28 +02:00
twinaphex
4ca5d31f9b
Some more static code analysis nits when ran with enable=all
2015-09-28 18:12:02 +02:00
radius
a2a00b28a0
[PSP] fix path_stat
2015-09-24 21:11:17 -05:00
radius
dc9044c6b7
[PSP] fix path_stat
2015-09-24 21:05:23 -05:00
twinaphex
6eb1a55b52
(PSP/Vita) retro_stat.t c - fix is directory check
2015-09-24 21:26:38 +02:00
twinaphex
a55d4a91ca
(PSP) Don't treat directory already existing as an error
2015-09-24 15:17:50 +02:00
twinaphex
764c76c84a
(retro_stat.c) Add PSP ifdef
2015-09-24 12:22:19 +02:00
twinaphex
df13e6a1fd
retro_stat.c - simplify code
2015-09-22 21:21:06 +02:00
twinaphex
ff1078a98b
(camera/drivers/video4linux2.c) Use path_is_character_special
2015-09-22 21:16:58 +02:00
twinaphex
385e030261
Move functions around
2015-09-22 19:34:16 +02:00
twinaphex
6779fcf4f1
(CXX_BUILD) Buildfix
2015-09-22 13:00:36 +02:00
twinaphex
2660606f41
(libretro-common) config_file.c - Cleanups
2015-09-22 12:58:22 +02:00
twinaphex
1f852fb23d
(libretro-common) Remove some header dependencies
2015-09-22 12:54:51 +02:00
twinaphex
5da780b2fd
Remove some header dependencies
2015-09-22 12:52:15 +02:00
twinaphex
cbb9744c66
(retro_stat.c) Warning fixes - include header for PS3
2015-09-22 01:51:34 +02:00
twinaphex
3db688d477
Create retro_stat.c/retro_stat.h
2015-09-22 01:45:30 +02:00
twinaphex
f581dce1f7
Use path_is_directory from retro_dirent.c
2015-09-21 23:20:46 +02:00
twinaphex
15b7fa545d
(PSP1) Buildfix
2015-09-21 22:48:50 +02:00
twinaphex
9d67d48036
Create path_is_valid
2015-09-21 22:46:27 +02:00
twinaphex
77d99395a2
(PS3) path_is_directory - add cellFsStat implementation
2015-09-21 21:59:04 +02:00
twinaphex
00b2ce6498
(retro_file.c) Add PS3 CellOS implementation
2015-09-21 21:53:47 +02:00
twinaphex
ed1690f819
(Vita) Define PSP_O_RDONLY
2015-09-20 11:36:07 +02:00
twinaphex
864dd33e0d
(retro_file.c) Vita - cleanups
2015-09-20 10:19:08 +02:00
Francisco José García García
1255674481
(Vita) Fix retro_file for VITA
2015-09-19 18:22:47 +02:00
Francisco José García García
92406fd4fa
(Vita) Fix directory creation
2015-09-19 17:27:01 +02:00
twinaphex
6f9d3d5a26
(file_extract.c) Cleanup
2015-09-19 01:06:47 +02:00
twinaphex
958dcc3c02
Get rid of retro_fmemcpy - and use retro_read_file
2015-09-19 01:03:52 +02:00
twinaphex
32ddeb3f96
Rename retro_fmemcpy_alloc to retro_read_file
2015-09-19 00:36:27 +02:00
twinaphex
3564532564
Create retro_write_file
2015-09-19 00:34:24 +02:00
twinaphex
a6e0b2f22d
(retro_file) Create retro_fmemcpy_alloc
2015-09-19 00:19:51 +02:00
twinaphex
3464781017
(PS/Vita) Buildfix for retro_file.c
2015-09-18 07:14:22 +02:00
twinaphex
57f390e44d
(retro_file.c) Buildfix for non-HAVE_BUFFERED_IO path
2015-09-18 07:13:06 +02:00
twinaphex
e25f3494ba
Buildfixes
2015-09-18 06:41:05 +02:00
twinaphex
c8df945792
Small cleanup
2015-09-18 05:44:13 +02:00
twinaphex
c4910985ed
(retro_file.c) Cleanup retro_fopen
2015-09-18 05:42:54 +02:00
twinaphex
5fdb1c8c43
(PSP/Vita) Fix fseek/ftell functionality for PSP/Vita
2015-09-18 05:34:30 +02:00
twinaphex
611be4bc16
(file_ops) Convert some functions in file_ops over to retro_file
...
(retro_file.c) Fix retro_fseek and retro_ftell functions
2015-09-18 05:22:50 +02:00
twinaphex
133e85298f
* Add retro_get_fd to retro_file.c
...
* Use retro_file in gfx/drivers_context/drm_egl_ctx.c
2015-09-18 03:47:44 +02:00
twinaphex
a547fdef50
Fix libretrodb_open - change mode to RFILE_MODE_READ - use
...
buffered I/O by default
2015-09-18 03:25:53 +02:00
twinaphex
b51e418c4c
(retro_file.c) HAVE_BUFFERED_IO - correct fread/fwrite arguments
2015-09-18 03:21:56 +02:00
twinaphex
35bd6e6ec8
Revert retro_file.c
2015-09-18 02:38:48 +02:00
Francisco José García García
b0fb027a54
(Vita) Fix MKDIR with using correct stat.h
2015-09-18 01:22:03 +02:00
twinaphex
dd58492fa6
Remove fcntl.h
2015-09-17 22:30:01 +02:00
Alcaro
7cf03b6d47
Revert that, doesn't work.
2015-09-17 22:14:45 +02:00
Alcaro
7054c8b214
Add the final read block too.
2015-09-17 22:10:06 +02:00
Alcaro
097f81ef4e
Return the correct length in this fmemcpy thing.
2015-09-17 22:08:56 +02:00
Alcaro
c8d627ff13
This looks like a buffer overflow.
2015-09-17 21:59:27 +02:00
Alcaro
691b7cffa9
Stupid fread/fwrite why do you need two arguments
2015-09-17 21:56:51 +02:00
Alcaro
1bb353ad59
This should be binary as well.
2015-09-17 21:55:50 +02:00
Alcaro
091409cc5a
Rename these variables, so missed ifdefs throw more violent errors.
2015-09-17 21:54:33 +02:00
twinaphex
714972bae9
(retro_file.c) Add USE_BUFFERED_IO
2015-09-17 21:31:00 +02:00
twinaphex
a6458d6ab6
Add PSP/Vita ifdefs to retro_file.c
2015-09-17 20:48:06 +02:00
twinaphex
52213c46d5
(PSP/Vita) Set mode to 0777
2015-09-17 20:25:31 +02:00