Commit graph

31 commits

Author SHA1 Message Date
Henrik Rydgård
bb2b214d5e Minor FS logging 2024-12-29 09:31:50 +01:00
Henrik Rydgård
c91169e702 Restore removed <algorithm> includes.
Turns out these were needed after all. For some reason, on Windows and
Mac, <algorithm> gets auto-included by something else so I don't notice
when it's missing, and MSVC's include dependency tracker doesn't see it
either.
2024-12-19 09:53:07 +01:00
Henrik Rydgård
3e198c53b2 More include cleanup 2024-12-18 13:57:26 +01:00
Henrik Rydgård
84154e837e Avoid running the initial savedata size scan except on games that need it. 2024-11-29 15:48:39 +01:00
Henrik Rydgård
7e194d15e2 For the free-space savedata scan, only scan relevant subdirectories. 2024-11-29 15:34:22 +01:00
Henrik Rydgård
7cbb60fd22 Bypass the PSP file system when calculating the savedata size to avoid a lock 2024-11-29 14:43:13 +01:00
Henrik Rydgård
6d2826dcb0 Move the MemoryStick free space calculation to a task instead of a thread 2024-11-29 14:35:46 +01:00
Henrik Rydgård
8a5be21140 MemStick screen: Call free_disk_space from async tasks
See #19522
2024-10-11 13:45:43 +02:00
Henrik Rydgård
b56eef487c Strict mode checking - no way to forget detaching now.
And if we forget to attach, boom. Hopefully I caught all of them.
2023-01-05 08:38:52 +01:00
Unknown W. Brackets
2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Henrik Rydgård
48310d15a9 Add metafilesystem hook to add optimized implementations of compute recursive directory size 2021-09-11 18:12:29 +02:00
Unknown W. Brackets
906664b9d8 Io: Cache SAVEDATA usage between writes.
Some games will loop over saves to check the size of each, and calculating
the total usage is expensive.  We don't need to recalculate each time.
2021-09-11 07:29:15 -07:00
Unknown W. Brackets
a3680ca3cb Io: Calculate memory stick size on a thread.
If you have a bunch of saves/states/etc. this might be a bit slow.
2021-04-16 01:15:23 -07:00
Henrik Rydgård
bbdc997913 If we are reporting a small memstick size, but data is bigger, lie.
Should fix #13829
2020-12-29 13:23:15 +01:00
Unknown W. Brackets
c95e695a38 Io: Track initial free space for compat flag.
This seems to be necessary for Assassin's Creed.  See #12761.
2020-10-19 22:42:49 -07:00
Unknown W. Brackets
e3a201fbc5 Io: Account for free space on the host device. 2020-10-18 20:55:30 -07:00
shenweip
166035a87b Simulates memory stick size to get fixed free space.
Some games may be sensitive to the changes of free space of memory stick, and Android's free space is usually variable.
2020-10-08 23:51:56 +08:00
Henrik Rydgård
92e6a91ae7 Add compat.ini setting to work around memstick size math problem in Harry Potter - Goblet of Fire
See issue #13266
2020-10-06 00:12:58 +02:00
Unknown W. Brackets
b8342fb8ec SaveState: Rename ChunkFile files to Serialize.
Makes more sense and less weird than ChunkFileDoMap, etc.
2020-08-10 08:04:05 +00:00
Unknown W. Brackets
4b4e3432cd SaveState: Split Do() into a separate header. 2020-08-10 08:03:41 +00:00
Unknown W. Brackets
83469d5b18 Fix a type conversion warning. 2016-09-05 19:14:48 -07:00
Unknown W. Brackets
980d4194c0 Io: Add a config setting for memstick status. 2016-08-05 21:27:53 -07:00
Unknown W. Brackets
bf7a020c6a Io: Notify callbacks on memstick insert/remove. 2016-08-05 21:05:48 -07:00
Unknown W. Brackets
9e488e8be4 Io: Correct some memstick devctl accuracy issues.
This makes it pass the right values in a few more cases, and unregister
callbacks properly.  Also handles duplicate callbacks.
2016-08-05 20:42:58 -07:00
Unknown W. Brackets
c4c581000f Report up to 9GB free on the memory stick.
This works around a bug in a Harry Potter game that happens on real
hardware.  Thanks to gdmk02 for a lot of testing.

Unfortunately, it'll still fail with certain amounts of free space, but it
does this on a real PSP also.
2015-01-05 22:38:47 -08: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
Unknown W. Brackets
50e9e45d65 Check version in each DoState() func.
They bail on PointerWrap error or bad version.
2013-09-14 20:23:03 -07:00
Unknown W. Brackets
2a6457b6ab Cut down on h files including PointerWrap.
This makes changes to it a bit faster to build.
2013-02-04 08:26:59 -08:00
Unknown W. Brackets
fbe4fd396e Add a mechanism to restore event callback ptrs.
Ugh, more duplicates.  Maybe can find a good way to refactor.
2012-12-28 13:55:24 -08:00
Henrik Rydgard
1b90a8b327 Another memstick ioctl, minor fixes 2012-11-09 10:01:54 +01:00
Henrik Rydgard
d086c18db7 MemoryStick HW 2012-11-06 15:45:13 +01:00