117 Commits

Author SHA1 Message Date
Unknown W. Brackets
4b4e3432cd SaveState: Split Do() into a separate header. 2020-08-10 08:03:41 +00:00
Unknown W. Brackets
d7ad43b1d9 Io: Cleanup access bits for files.
Also, we default a lot of these members, so don't need to reset.
2020-05-21 18:58:24 -07:00
Unknown W. Brackets
49abe9ed6c Io: Open sce_lbn references and whole ISO faster. 2020-05-21 18:58:24 -07:00
Unknown W. Brackets
67416e5919 Io: Simulate VFAT bug only when simulating FAT32.
And cleanup flag handling a bit.
2020-05-21 18:57:46 -07:00
Unknown W. Brackets
08b6275bc7 Io: Apply VFAT hack only to dirs <= 8 chars long.
Fixes Mega Drops 2, which relies on the lowercase name at about 10
characters.
2020-03-21 22:49:19 -07:00
Unknown W. Brackets
cb1b7b1e43 Core: Bring over some file related Switch changes.
Reducing the distance from the Switch port code.
2020-03-03 22:53:03 -08:00
Unknown W. Brackets
5009698cc0 Core: Use a shared_ptr for i18n categories.
This does not make them thread safe, but it reduces the chances of a crash
a bit (see #12594.)
2020-02-09 07:35:16 -08:00
Unknown W. Brackets
913121cf2b Io: Consistently use error codes with OpenFile().
This gets rid of OpenWithError(), and just always returns a negative value
on error for OpenFile().  Also fixed the sequence rollover, which could've
returned 0.

0 should be considered a valid handle ideally, but left it never returning
0 to simplify cleanup in some areas.
2019-10-20 11:03:37 -07:00
Unknown W. Brackets
761a9d321f Windows: Allow write-only files to be read later.
Fixes #11939, at least the hang described in that issue.  Seems to match
with how the PSP handles file locking.
2019-08-10 08:34:01 -07:00
Henrik Rydgård
4d195ce955 Workaround for DJ Max Portable's clumsy copy protection. Fixes #9477. 2019-08-01 18:45:28 +02:00
Unknown W. Brackets
33cfac549d Replay: Attempt to ignore reads in PSP/GAME.
Unless there are writes in this directory, we should be able to safely
ignore them.

Currently detection isn't perfect (like PSP/./GAME/../GAME), but this
should catch the vast majority of cases.
2019-07-04 23:46:15 -07:00
Henrik Rydgård
0cd3ac06d0 Avoid trying to create a FileLoader for empty filenames
Assorted cleanup
2019-02-25 21:35:51 +01:00
Henrik Rydgård
b572dc52a5 Remove usage of deprecated function readdir_r (and ugly Blackberry hack diren_large) 2019-01-08 12:29:59 +01:00
Unknown W. Brackets
340460f01c Io: Add missing error code on file open.
Doesn't affect Windows.
2018-11-06 19:28:22 -08:00
Unknown W. Brackets
ac5467ca67 Io: Linux buildfix.
Fixes #11300.
2018-08-13 07:32:53 -07:00
Unknown W. Brackets
7a058180bb Io: Prevent cur/parent dir in listing of root.
See #9344.  Matches tests.
2018-08-12 19:27:26 -07:00
Unknown W. Brackets
3c698a5ddb Io: Prevent error when file locked for writing.
When reopening with file sharing flags fixed it, we shouldn't set error.
That would cause the open to still fail.
2018-05-08 18:25:15 -07:00
Unknown W. Brackets
f4e8e68c44 Io: Cleanup file not found error codes.
Replay (#10888) caused error to be non zero, which was later translated to
something else, confusingly...
2018-05-06 10:15:05 -07:00
Unknown W. Brackets
224229fc1b Replay: Skip recording virtual disc reads.
Oops.
2018-04-17 07:51:49 -07:00
Unknown W. Brackets
89186d8113 Replay: Initial structure for replay functionality. 2018-04-07 15:36:28 -07:00
Henrik Rydgård
fb798cf6b2 Win32 textdrawer: Fix rare crash affecting Patapon 2 in savedata manager. See 10764. 2018-03-23 10:27:08 +01:00
Unknown W. Brackets
a223d4e272 Apply a hack to simulate USB created files.
Fixes #9794.  Some homebrew accidentally depend on this PSP firmware bug.
2017-06-12 22:55:50 -07:00
Henrik Rydgard
fcbc20f240 Small changes to make Common and Core build under my preliminary UWP setup. 2017-02-24 18:59:41 +01:00
Henrik Rydgard
b0942cf40f Implement sceIoCreate flag O_EXCL. Should fix #9322 2017-02-19 10:05:17 +01:00
Florent Castelli
70593d1004 android: Change preprocessor define to standard __ANDROID__
ANDROID is only standard to the old Makefile buildsystem, not the platform.
2016-10-12 11:14:09 +02:00
Florent Castelli
4145b60a0e symbian: Remove! 2016-10-11 18:49:08 +02:00
Unknown W. Brackets
4826405c26 File: Retry open when a sharing violation is hit.
Some editors will lock the file while it's open, and it is convenient if
you can still have things work when that happens.
2016-06-04 18:17:05 -07:00
Unknown W. Brackets
a1fbcc3d93 Avoid directly calling osm from Core/GPU code.
This allows UI to handle the message however it wants to, and reduces
cross linkage issues.
2016-05-27 22:05:30 -07:00
Unknown W. Brackets
df6cbafe0f Measure free disk space to size block count. 2015-11-18 21:56:03 -08:00
Henrik Rydgard
6fcbfabdd2 Rename fields to avoid some gross #define hack that linux is doing 2015-09-23 12:10:23 +02:00
Henrik Rydgard
77e9ea38aa Get rid of remaining uses of stat() on Windows 2015-09-23 11:34:22 +02:00
Henrik Rydgard
58d3137b10 Get rid of a bunch of more uses of stat64 on Windows. 2015-09-23 09:48:55 +02:00
Unknown W. Brackets
afe42fa505 Log an error if ftruncate() fails. 2015-04-08 12:08:46 -07:00
Unknown W. Brackets
52288f5905 Report any attempt to read a negative size.
If this should return an error, that should be handled in sceIo.
2015-01-09 15:50:06 -08:00
Unknown W. Brackets
d6a113809b Add basic infrastructure to time io better.
This allows the filesystems to more accurately control timing.
But they're not actually doing it yet (same timing as before.)
2014-12-26 01:15:17 -08:00
Unknown W. Brackets
f3f7fb2648 Show an on screen message when disk full is hit. 2014-11-02 13:29:25 -08:00
Unknown W. Brackets
a6a234add1 Return errors on disk full for file creation. 2014-11-02 12:40:31 -08:00
Unknown W. Brackets
d4e8bd96af Handle disk full more properly in sceIoWrite(). 2014-11-02 10:55:27 -08:00
Sacha
b7f2de7d29 Check free disk space on Symbian too. 2014-11-02 12:27:20 +10:00
Unknown W. Brackets
f687613d68 Check disk space on Posix/Android systems also.
Android apparently decided to skip statvfs() and only implement the older,
os-dependent statfs().
2014-11-01 00:33:20 -07:00
Unknown W. Brackets
2958c575a1 Check actual free disk space when games ask.
Windows only for the moment.
2014-11-01 00:33:19 -07:00
Andrew Church
97a0b0c510 Remove bogus blank line. 2014-09-04 18:09:07 +09:00
Andrew Church
f976c309b4 Ensure that sceIoOpen() fails on directories. 2014-09-04 18:03:28 +09:00
Unknown W. Brackets
a5b0901c36 Improve cross-platform savestate compat.
If 0 files are open in flash0:, which is very very common, this will make
them work the same.
2014-07-04 13:34:38 -07:00
Henrik Rydgard
d6b51d4dfa Reduce some excessive logging 2014-06-09 19:40:05 +02:00
Henrik Rydgard
a53ecd7da3 More elegant way of solving #5839 (d_private in sceIoDread)
We flag filesystems as being FAT32 instead of checking for "ms0:".
2014-04-13 23:22:17 +02:00
Unknown W. Brackets
943bc7ee78 Oops, close the dir after listing it in ms0:/.
This was affecting some savedata modes, and showed up on tests.  Not sure
how it might've affected games, probably not much.
2014-03-30 19:34:19 -07:00
Unknown W. Brackets
3a376a0cd9 Fix exists check in VFSFileSystem::GetFileInfo().
Only matters if it can't map the path / doesn't have the apk mapped (e.g.
as on headless right now.)
2014-03-23 13:01:52 -07:00
Unknown W. Brackets
ed2417731a Improve error handling when PARAM.SFO can't read. 2014-02-15 10:34:39 -08:00
Unknown W. Brackets
cff6ad6428 Attempt to virtually handle truncation properly.
Fixes LittleBigPlanet save problem, at least on US.
2014-02-15 10:34:38 -08:00