瀏覽代碼

CFG: Fixed some warnings and errors in Clang

Subv 11 年之前
父節點
當前提交
2030f9d946
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 3 3
      src/core/hle/service/cfg/cfg.cpp
  2. 1 1
      src/core/hle/service/cfg/cfg.h

+ 3 - 3
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 code

+ 1 - 1
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