This adds unit tests for the Wii filesystem now that the filesystem
interface is neatly separated from the IPC code.
Basic FS functionality is tested, in addition to problematic usages and
edge cases that Dolphin used to handle incorrectly (which of course
broke emulated software).
These tests should make it quite a bit harder to introduce regressions.
Issues that are covered by the tests in particular:
* Metadata: issue 10234 (though tests are commented out for now because
Dolphin doesn't support NAND images yet so it can't track metadata);
* EOF seeks/reads: https://github.com/dolphin-emu/dolphin/pull/4942
* Read/write operations from multiple handles: see issue 2917, 5232 and
8702 and https://github.com/dolphin-emu/dolphin/pull/2649
Xlib has really terrible headers that declare non-namespaced
macros and typedefs for common words.
Just wasted 10 minutes trying to figure out why a unit test failed
to build before I remembered it was Xrandr.h conflicting with our
enum class members again.
To fix the issue, this removes the Display* parameter from the
EnableScreensaver function (which was unused) so we don't have
to include Xrandr.h anymore.
Allows us to bring includes and relevant libraries into scope by explicitly declaring linkage against the target
as opposed to using a variable. Also removes the dumping of OProfile includes into the top-level directory.
Just re-disassembled STM and found out I have made a mistake when
I changed STM stuff back in 2016.
I accidentally made STM reset the event hook on close when it should
have been done in the destructor (i.e. when IOS gets reset on console).
Verified in IDA that STM just `IOS_ResourceReply(request, IOS_OK)`
without ever resetting the hook.
Some button names should be translated, for instance Up, Left and such.
At the same time, some other button names shouldn't be translated,
for reasons that might be less obvious. In 0146456af, I removed the
_trans markers for button names that never need to be translated
(such as A and B), but that isn't actually enough to ensure that
DolphinWX won't try to translate them anyway. This commit adds a bool
that explicitly tells the GUI whether a button name should be translated.
Otherwise we'll have problems like the GUI treating the button name "B"
(which isn't supposed to be translated) as matching the translatable
string "B" (being an abbreviation of "bytes"), meaning that the button
"B" will be labeled "o" when running Dolphin in French (after
translations get pulled from Transifex the next time).
By the way, while it turned out that DolphinWX translated all button
names, it also turned out that DolphinQt2 translated *no* button names.
Go figure. This commit makes them consistent with each other.
There's no real requirement to make this const, and this should also
be decided by the calling code, considering we had places that would
simply cast away the const and carry on.
It's not common code that could be reused for, say, Citra;
it's absolutely specific to Wii emulation and only used by the Dolphin
core, so let's move it there.
Another reason for doing this is to avoid having Common depend on Core.
It was discovered that some titles rely on filesystem metadata to work
properly. Currently, in master they either simply won't find their
save files (for example Bolt) or will complain about the Wii system
memory being corrupted (on first use or every time depending on
the title).
In order to even be able to keep track of file metadata, we first need
to eliminate all direct accesses to the NAND and make all kinds of
operations go through the filesystem code added in PR 6421.
This commit starts the migration process by making SysConf use
the new FS interface.
This used to be necessary for properly cleaning up the FS state because
the old FS implementation used static state and only performed cleanup
in the close function, not in the destructor.
Now that the static state is gone, we do not need to close devices
manually anymore.