summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Subv2014-12-19 19:57:42 -0500
committerGravatar Subv2014-12-21 16:39:08 -0500
commitb3d1c8ba6a57946658a2b3823a1920bc3a22a982 (patch)
treea4bc68d2941c7f31151e4e9d4cc52be30608ff78 /src
parentCFG: Load the Config savedata file if it already exists. (diff)
downloadyuzu-b3d1c8ba6a57946658a2b3823a1920bc3a22a982.tar.gz
yuzu-b3d1c8ba6a57946658a2b3823a1920bc3a22a982.tar.xz
yuzu-b3d1c8ba6a57946658a2b3823a1920bc3a22a982.zip
CFGU: Use an absolute offset in the config savefile blocks
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/cfg_u.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/service/cfg_u.cpp b/src/core/hle/service/cfg_u.cpp
index ee97cf3e5..33f63a759 100644
--- a/src/core/hle/service/cfg_u.cpp
+++ b/src/core/hle/service/cfg_u.cpp
@@ -184,7 +184,7 @@ ResultCode GetConfigInfoBlock(u32 block_id, u32 size, u32 flag, u8* output) {
184 if (itr->size <= 4) 184 if (itr->size <= 4)
185 memcpy(output, &itr->offset_or_data, itr->size); 185 memcpy(output, &itr->offset_or_data, itr->size);
186 else 186 else
187 memcpy(output, &cfg_config_file_buffer[config->data_entries_offset + itr->offset_or_data], itr->size); 187 memcpy(output, &cfg_config_file_buffer[itr->offset_or_data], itr->size);
188 188
189 return RESULT_SUCCESS; 189 return RESULT_SUCCESS;
190} 190}
@@ -219,6 +219,8 @@ ResultCode CreateConfigInfoBlk(u32 block_id, u32 size, u32 flags, u8 const* data
219 break; 219 break;
220 } 220 }
221 221
222 offset += config->data_entries_offset;
223
222 config->block_entries[config->total_entries].offset_or_data = offset; 224 config->block_entries[config->total_entries].offset_or_data = offset;
223 225
224 // Write the data at the new offset 226 // Write the data at the new offset