<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dolphin/Source/Core/Common/SysConf.cpp, branch master</title>
<subtitle>GameCube and Wii emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/'/>
<entry>
<title>Move SysConf to Core</title>
<updated>2018-04-12T20:16:37+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@innovatetechnologi.es</email>
</author>
<published>2018-03-11T10:43:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=a287bbc3bda6b07ae936494a3d01a2e789a906eb'/>
<id>a287bbc3bda6b07ae936494a3d01a2e789a906eb</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>SysConf: Migrate to new filesystem interface</title>
<updated>2018-04-12T20:16:37+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@innovatetechnologi.es</email>
</author>
<published>2018-03-11T11:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=0856d4a68a61b274353b1b46d7eb8f725402bf5b'/>
<id>0856d4a68a61b274353b1b46d7eb8f725402bf5b</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>Assert: Uppercase assertion macros</title>
<updated>2018-03-15T02:03:12+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2018-03-15T00:34:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=50a476c3714b3c423609ec04ce424c244bd2a1c1'/>
<id>50a476c3714b3c423609ec04ce424c244bd2a1c1</id>
<content type='text'>
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
</pre>
</div>
</content>
</entry>
<entry>
<title>Config: Include SYSCONF in base layer</title>
<updated>2017-08-11T07:36:31+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@innovatetechnologi.es</email>
</author>
<published>2017-08-01T14:37:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=b2c41cec0aae76b9680506f336ba3792540e1527'/>
<id>b2c41cec0aae76b9680506f336ba3792540e1527</id>
<content type='text'>
Settings that come from the SYSCONF are now included in Dolphin's
config system as part of the base layer. They are handled in a
special way compared to other settings to make sure they are only
loaded from and saved to the SYSCONF (to avoid different, possibly
contradicting sources of truth).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Settings that come from the SYSCONF are now included in Dolphin's
config system as part of the base layer. They are handled in a
special way compared to other settings to make sure they are only
loaded from and saved to the SYSCONF (to avoid different, possibly
contradicting sources of truth).
</pre>
</div>
</content>
</entry>
<entry>
<title>SysConf: Fix writing a new SYSCONF</title>
<updated>2017-07-31T07:18:43+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@innovatetechnologi.es</email>
</author>
<published>2017-07-31T07:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=b5e7c417ff8d0ef8c9dea2eb7533fdcd87aeb2ae'/>
<id>b5e7c417ff8d0ef8c9dea2eb7533fdcd87aeb2ae</id>
<content type='text'>
On Windows, File::GetTempFilenameForAtomicWrite returns a path
somewhere in C:\Users\XXX\AppData\Local\Temp\{UUID here}\
in which all writes just fail.

Just use the SYSCONF path + ".tmp" for the temporary file name.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Windows, File::GetTempFilenameForAtomicWrite returns a path
somewhere in C:\Users\XXX\AppData\Local\Temp\{UUID here}\
in which all writes just fail.

Just use the SYSCONF path + ".tmp" for the temporary file name.
</pre>
</div>
</content>
</entry>
<entry>
<title>SysConf: Handle array entries properly</title>
<updated>2017-07-23T07:57:29+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@innovatetechnologi.es</email>
</author>
<published>2017-07-04T14:09:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=c759739ee9ec9f577c524a7b48116ac933e91623'/>
<id>c759739ee9ec9f577c524a7b48116ac933e91623</id>
<content type='text'>
It turns out that the last byte of array entries isn't unused (as we
thought); instead, it looks like it's actually part of the main data,
and the length stored next to the name is in fact the length minus one.

Getting it wrong and always storing a null byte in there won't affect
most entries (since the last byte is zeroed most of the time), except:

- IPL.NIK: the length is stored in the last byte, and it must be kept.
- BT.DINF: u8 unknown[0x45] should be another Bluetooth device entry.
- Possibly other unknown affected entries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It turns out that the last byte of array entries isn't unused (as we
thought); instead, it looks like it's actually part of the main data,
and the length stored next to the name is in fact the length minus one.

Getting it wrong and always storing a null byte in there won't affect
most entries (since the last byte is zeroed most of the time), except:

- IPL.NIK: the length is stored in the last byte, and it must be kept.
- BT.DINF: u8 unknown[0x45] should be another Bluetooth device entry.
- Possibly other unknown affected entries.
</pre>
</div>
</content>
</entry>
<entry>
<title>FileUtil: Add a class for Exists/IsDirectory/GetSize</title>
<updated>2017-06-29T17:07:29+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2017-06-29T09:20:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=5ca3aee00ac3ac1a906de68c216907a7b41825fe'/>
<id>5ca3aee00ac3ac1a906de68c216907a7b41825fe</id>
<content type='text'>
Some code was calling more than one of these functions in a row
(in particular, FileUtil.cpp itself did it a lot...), which is
a waste since it's possible to call stat a single time and then
read all three values from the stat struct. This commit adds a
File::FileInfo class that calls stat once on construction and
then lets Exists/IsDirectory/GetSize be executed very quickly.

The performance improvement mostly matters for functions that
can be handling a lot of files, such as File::ScanDirectoryTree.

I've also done some cleanup in code that uses these functions.
For instance, some code had checks like !Exists() || !IsDirectory(),
which is functionally equivalent to !IsDirectory(), and some
code was using File::GetSize even though there was an IOFile
object that the code could call GetSize on.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some code was calling more than one of these functions in a row
(in particular, FileUtil.cpp itself did it a lot...), which is
a waste since it's possible to call stat a single time and then
read all three values from the stat struct. This commit adds a
File::FileInfo class that calls stat once on construction and
then lets Exists/IsDirectory/GetSize be executed very quickly.

The performance improvement mostly matters for functions that
can be handling a lot of files, such as File::ScanDirectoryTree.

I've also done some cleanup in code that uses these functions.
For instance, some code had checks like !Exists() || !IsDirectory(),
which is functionally equivalent to !IsDirectory(), and some
code was using File::GetSize even though there was an IOFile
object that the code could call GetSize on.
</pre>
</div>
</content>
</entry>
<entry>
<title>SysConf: Don't set "config done" flags by default</title>
<updated>2017-06-18T20:32:56+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@innovatetechnologi.es</email>
</author>
<published>2017-06-16T20:38:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=7222ce78ff6a76e984b43ba8a2e81cb457b63d77'/>
<id>7222ce78ff6a76e984b43ba8a2e81cb457b63d77</id>
<content type='text'>
This allows the user to go through the Wii Menu first boot setup
screen when they launch the System Menu for the first time.

Most useful on a clean profile, after doing a full system update,
to configure settings like the console country.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows the user to go through the Wii Menu first boot setup
screen when they launch the System Menu for the first time.

Most useful on a clean profile, after doing a full system update,
to configure settings like the console country.
</pre>
</div>
</content>
</entry>
<entry>
<title>Rewrite SysConf handling</title>
<updated>2017-06-18T14:17:05+00:00</updated>
<author>
<name>Léo Lam</name>
<email>leo@innovatetechnologi.es</email>
</author>
<published>2017-03-10T17:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=d86f020e81f3df53a83c80f1a0a99f1b12093010'/>
<id>d86f020e81f3df53a83c80f1a0a99f1b12093010</id>
<content type='text'>
This rewrites the SysConf code for several reasons:

* Modernising the SysConf class. The naming was entirely cleaned up.
  constexpr for constants.

* Exposing less stuff in the header.

* Probably less efficient parsing and writing logic, but much simpler
  to understand and use in my opinion. No more hardcoded offsets.
  No more duplicated code for the initial SYSCONF generation.

* More flexibility. It is now possible to add and remove entries,
  since we rebuild the file. This allows us to stop spamming
  "section not found" panic alerts; we can now use and insert
  default entries.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This rewrites the SysConf code for several reasons:

* Modernising the SysConf class. The naming was entirely cleaned up.
  constexpr for constants.

* Exposing less stuff in the header.

* Probably less efficient parsing and writing logic, but much simpler
  to understand and use in my opinion. No more hardcoded offsets.
  No more duplicated code for the initial SYSCONF generation.

* More flexibility. It is now possible to add and remove entries,
  since we rebuild the file. This allows us to stop spamming
  "section not found" panic alerts; we can now use and insert
  default entries.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move IOFile to a separate file</title>
<updated>2017-06-15T19:33:50+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2017-01-15T20:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=f09ceaa735080b8cde5f9102e7f061530d9b474e'/>
<id>f09ceaa735080b8cde5f9102e7f061530d9b474e</id>
<content type='text'>
Reduces the number of files that need to be recompiled
when making changes to FileUtil.h.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reduces the number of files that need to be recompiled
when making changes to FileUtil.h.
</pre>
</div>
</content>
</entry>
</feed>
