dolphin/Source
Léo Lam a6649da088 IOS/FFSP: Fix the read handler logic
This changes the read request handler to work just like IOS:

* To make things clearer, we now return early from error conditions,
  instead of having nested ifs.

* IOS does an additional check on the requested read length, and
  substracts the current seek position from it, if the read would
  cause IOS to read past the EOF (not sure what the purpose of this
  check is, but IOS does it, so we should too).

* The most significant one: IOS does *not* return the requested read
  length, or update the file seek position with it. Instead, it uses
  the *actual* read length.

As a result of simply doing what IOS does, this fixes _Mushroom Men_.
The game creates a save file, reads 2560 bytes from it, then
immediately writes 16384 bytes to it. With IOS, the first read does not
change the seek position at all, so the save data is written at
offset 0, not 2560. With Dolphin, the read erroneously set the
seek position to 2560, which caused the data to be written at
the wrong location.

Behavior confirmed by comparing IPC replies with IOS LLE and by looking
at the FS module in IOS.
2017-02-20 23:13:15 +01:00
..
Android Core: Convert State enum into an enum class 2017-02-05 08:32:23 -05:00
Core IOS/FFSP: Fix the read handler logic 2017-02-20 23:13:15 +01:00
DSPSpy
DSPTool DSP: Namespace remaining un-namespaced DSP code 2016-12-31 17:20:14 -05:00
PCH
UnitTests Merge pull request #4809 from Orphis/cmake_windows 2017-02-03 08:33:13 -05:00
VSProps Merge pull request #4408 from leoetlino/usb 2017-02-07 09:17:05 +13:00
.clang-format clang-format: Sort windows.h before other headers 2017-01-23 00:35:09 -08:00
CMakeLists.txt CMake: use _SCL_SECURE_NO_WARNINGS instead of _SECURE_SCL=0 2017-02-10 16:28:39 -08:00
dolphin-emu.sln