- Fix target_precompile_headers() usage; the CemuCommon target exposes
the src/Common/precompiled.h precompiled header as part of its public
interface with
target_precompile_headers(CemuCommon PUBLIC precompiled.h), so all the
other targets wanting to use the precompiled header have to link to
the CemuCommon target with
target_precompile_headers(TargetName PRIVATE CemuCommon).
- Set the project version to 2.0
- Set RUNTIME_OUTPUT_DIRECTORY instead of only their _DEBUG and _RELEASE
variants, fixing the compilation when neither build types are defined
- Use a consistent indentation style (tabs, like in the .cpp files)
- Use "modern" variants of some functions, e.g. add_definitions ->
add_compile_definitions
Also adds some code for enabling multi-user support inside apps maybe, but it's probably hardcoded in more places since Cemu currently only shows the active account.
This is just a quick fix. In the future we can look into avoiding hardcoded firmware version numbers. On the console it gets read from some system file
* Update OpenSSL hash functions to OpenSSL 3.0
* Fix invalid sscanf format in DownloadManager
* Fix unset return value warning
* Fix erroneous check on otpMem in iosu_crypto
Doesn't seem like there's a way to bypass the need for default values in their API, and since their versions doesn't seem to be reliable enough to know whether maxDualSourceDrawBuffersEXT exists. This way it's default initialized to 0 which is fine for Cemu.
The previous implementation used an std::stringstream to concatenate
the generated random string.
The new one uses a simple preallocated std::string, as the size of the
output is already known - it is the length parameter.
It also uses std::generate_n() instead of an explicit loop, making the
code more concise and potentially faster, as no calls to
std::string::operator+= are needed.
Calling GenerateRandomString(1'000'000) with the std::stringstream-based
implementation allocated 16 times, for a total of 3'173'516 bytes.
The new one cuts this down to 4 allocs, for a total of 1'076'864 bytes.