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
718a1207
There was an error fetching the commit references. Please try again later.
Commit
718a1207
authored
10 years ago
by
Subv
Browse files
Options
Downloads
Patches
Plain Diff
CFGU: Addressed some comments.
parent
a1b9b80a
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_u.cpp
+13
-11
13 additions, 11 deletions
src/core/hle/service/cfg_u.cpp
with
13 additions
and
11 deletions
src/core/hle/service/cfg_u.cpp
+
13
−
11
View file @
718a1207
...
...
@@ -57,7 +57,7 @@ static const u8 SOUND_OUTPUT_MODE = 2;
static
const
u32
CONFIG_SAVEFILE_SIZE
=
0x8000
;
static
std
::
array
<
u8
,
CONFIG_SAVEFILE_SIZE
>
cfg_config_file_buffer
=
{
};
/// TODO(Subv): Find out what this actually is
/// TODO(Subv): Find out what this actually is
, these values fix some NaN uniforms in some games
/// Thanks Normmatt for providing this information
static
const
std
::
array
<
float
,
8
>
STEREO_CAMERA_SETTINGS
=
{
62.0
f
,
289.0
f
,
76.80000305175781
f
,
46.08000183105469
f
,
...
...
@@ -67,8 +67,9 @@ static const std::array<float, 8> STEREO_CAMERA_SETTINGS = {
// TODO(Link Mauve): use a constexpr once MSVC starts supporting it.
#define C(code) ((code)[0] | ((code)[1] << 8))
static
const
u8
UNITED_STATES_COUNTRY_ID
=
49
;
/// TODO(Subv): Find what the other bytes are
static
const
std
::
array
<
u8
,
4
>
COUNTRY_INFO
=
{
0
,
0
,
0
,
C
(
"US"
)
};
static
const
std
::
array
<
u8
,
4
>
COUNTRY_INFO
=
{
0
,
0
,
0
,
UNITED_STATES_COUNTRY_ID
};
static
const
std
::
array
<
u16
,
187
>
country_codes
=
{
0
,
C
(
"JP"
),
0
,
0
,
0
,
0
,
0
,
0
,
// 0-7
...
...
@@ -224,16 +225,16 @@ ResultCode CreateConfigInfoBlk(u32 block_id, u32 size, u32 flags, u8 const* data
s32
total_entries
=
config
->
total_entries
-
1
;
u32
offset
=
config
->
data_entries_offset
;
// Perform a search to locate the next offset for the new data
// use the offset and size of the previous block to determine the new position
while
(
total_entries
>=
0
)
{
// Ignore the blocks that don't have a separate data offset
if
(
config
->
block_entries
[
total_entries
].
size
<=
4
)
{
--
total_entries
;
continue
;
if
(
config
->
block_entries
[
total_entries
].
size
>
4
)
{
offset
=
config
->
block_entries
[
total_entries
].
offset_or_data
+
config
->
block_entries
[
total_entries
].
size
;
break
;
}
offset
=
config
->
block_entries
[
total_entries
].
offset_or_data
+
config
->
block_entries
[
total_entries
].
size
;
break
;
--
total_entries
;
}
config
->
block_entries
[
config
->
total_entries
].
offset_or_data
=
offset
;
...
...
@@ -424,11 +425,12 @@ Interface::Interface() {
}
// Initialize the Username block
// TODO(Subv):
Do this somewhere else, or in another way
// TODO(Subv):
Initialize this directly in the variable when MSVC supports char16_t string literals
CONSOLE_USERNAME_BLOCK
.
ng_word
=
0
;
CONSOLE_USERNAME_BLOCK
.
zero
=
0
;
std
::
fill
(
std
::
begin
(
CONSOLE_USERNAME_BLOCK
.
username
)
+
Common
::
UTF8ToUTF16
(
CONSOLE_USERNAME
).
copy
(
CONSOLE_USERNAME_BLOCK
.
username
,
0x14
),
// Copy string to buffer and pad with zeros at the end
auto
itr
=
Common
::
UTF8ToUTF16
(
CONSOLE_USERNAME
).
copy
(
CONSOLE_USERNAME_BLOCK
.
username
,
0x14
);
std
::
fill
(
std
::
begin
(
CONSOLE_USERNAME_BLOCK
.
username
)
+
itr
,
std
::
end
(
CONSOLE_USERNAME_BLOCK
.
username
),
0
);
FormatConfig
();
}
...
...
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