Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Suyu
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
many-archive
Suyu
Commits
304735fb
There was an error fetching the commit references. Please try again later.
Commit
304735fb
authored
10 years ago
by
Subv
Browse files
Options
Downloads
Patches
Plain Diff
CFG: More style changes
parent
f080e3cc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/hle/service/cfg/cfg.cpp
+5
-5
5 additions, 5 deletions
src/core/hle/service/cfg/cfg.cpp
with
5 additions
and
5 deletions
src/core/hle/service/cfg/cfg.cpp
+
5
−
5
View file @
304735fb
...
...
@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include
<algorithm>
#include
"common/log.h"
#include
"common/make_unique.h"
#include
"core/file_sys/archive_systemsavedata.h"
...
...
@@ -33,8 +34,8 @@ const std::array<float, 8> STEREO_CAMERA_SETTINGS = {
10.0
f
,
5.0
f
,
55.58000183105469
f
,
21.56999969482422
f
};
const
u32
CONFIG_SAVEFILE_SIZE
=
0x8000
;
std
::
array
<
u8
,
CONFIG_SAVEFILE_SIZE
>
cfg_config_file_buffer
=
{}
;
static
const
u32
CONFIG_SAVEFILE_SIZE
=
0x8000
;
static
std
::
array
<
u8
,
CONFIG_SAVEFILE_SIZE
>
cfg_config_file_buffer
;
static
std
::
unique_ptr
<
FileSys
::
Archive_SystemSaveData
>
cfg_system_save_data
;
...
...
@@ -118,7 +119,7 @@ ResultCode FormatConfig() {
if
(
!
res
.
IsSuccess
())
return
res
;
// Delete the old data
std
::
fill
(
cfg_config_file_buffer
.
begin
(),
cfg_config_file_buffer
.
end
(),
0
);
cfg_config_file_buffer
.
fill
(
0
);
// Create the header
SaveFileConfig
*
config
=
reinterpret_cast
<
SaveFileConfig
*>
(
cfg_config_file_buffer
.
data
());
// This value is hardcoded, taken from 3dbrew, verified by hardware, it's always the same value
...
...
@@ -160,9 +161,8 @@ ResultCode FormatConfig() {
void
CFGInit
()
{
// TODO(Subv): In the future we should use the FS service to query this archive,
// currently it is not possible because you can only have one open archive of the same type at any time
using
Common
::
make_unique
;
std
::
string
syssavedata_directory
=
FileUtil
::
GetUserPath
(
D_SYSSAVEDATA_IDX
);
cfg_system_save_data
=
make_unique
<
FileSys
::
Archive_SystemSaveData
>
(
cfg_system_save_data
=
Common
::
make_unique
<
FileSys
::
Archive_SystemSaveData
>
(
syssavedata_directory
,
CFG_SAVE_ID
);
if
(
!
cfg_system_save_data
->
Initialize
())
{
LOG_CRITICAL
(
Service_CFG
,
"Could not initialize SystemSaveData archive for the CFG:U service"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment