VERY experimental Nintendo Switch 2 emulator
C++
CFG: Fixed some warnings and errors in Clang
Subv2030f9d946dc
diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cppindex abc2480f3e..161aa8531e 100644--- a/src/core/hle/service/cfg/cfg.cpp+++ b/src/core/hle/service/cfg/cfg.cpp@@ -13,7 +13,7 @@ namespace CFG {const u64 CFG_SAVE_ID = 0x00010017;const u64 CONSOLE_UNIQUE_ID = 0xDEADC0DE;-const ConsoleModelInfo CONSOLE_MODEL = { NINTENDO_3DS_XL, 0, 0, 0 };+const ConsoleModelInfo CONSOLE_MODEL = { NINTENDO_3DS_XL, { 0, 0, 0 } };const u8 CONSOLE_LANGUAGE = LANGUAGE_EN;const char CONSOLE_USERNAME[0x14] = "CITRA";/// This will be initialized in CFGInit, and will be used when creating the block@@ -22,7 +22,7 @@ UsernameBlock CONSOLE_USERNAME_BLOCK;const u8 SOUND_OUTPUT_MODE = 2;const u8 UNITED_STATES_COUNTRY_ID = 49;/// TODO(Subv): Find what the other bytes are-const ConsoleCountryInfo COUNTRY_INFO = { 0, 0, 0, UNITED_STATES_COUNTRY_ID };+const ConsoleCountryInfo COUNTRY_INFO = { { 0, 0, 0 }, UNITED_STATES_COUNTRY_ID };/*** TODO(Subv): Find out what this actually is, these values fix some NaN uniforms in some games,@@ -62,7 +62,7 @@ ResultCode GetConfigInfoBlock(u32 block_id, u32 size, u32 flag, u8* output) {return RESULT_SUCCESS;}-ResultCode CreateConfigInfoBlk(u32 block_id, u32 size, u32 flags, const u8* data) {+ResultCode CreateConfigInfoBlk(u32 block_id, u16 size, u16 flags, const u8* data) {SaveFileConfig* config = reinterpret_cast<SaveFileConfig*>(cfg_config_file_buffer.data());if (config->total_entries >= CONFIG_FILE_MAX_BLOCK_ENTRIES)return ResultCode(-1); // TODO(Subv): Find the right error codediff --git a/src/core/hle/service/cfg/cfg.h b/src/core/hle/service/cfg/cfg.hindex 38db5a5ec9..c74527ca47 100644--- a/src/core/hle/service/cfg/cfg.h+++ b/src/core/hle/service/cfg/cfg.h@@ -114,7 +114,7 @@ ResultCode GetConfigInfoBlock(u32 block_id, u32 size, u32 flag, u8* output);* @param data A pointer containing the data we will write to the new block* @returns ResultCode indicating the result of the operation, 0 on success*/-ResultCode CreateConfigInfoBlk(u32 block_id, u32 size, u32 flags, const u8* data);+ResultCode CreateConfigInfoBlk(u32 block_id, u16 size, u16 flags, const u8* data);/*** Deletes the config savegame file from the filesystem, the buffer in memory is not affected