diff options
| author | 2019-11-03 18:54:03 -0500 | |
|---|---|---|
| committer | 2019-11-03 22:22:41 -0500 | |
| commit | 1bdae0fe29f87daa81d2aba052a10a709b87485a (patch) | |
| tree | 16d0f4aa4c4a11222c6950b3ad60e7d1d9905036 /src/core/hle/service | |
| parent | Merge pull request #3059 from FearlessTobi/stub-am-commands (diff) | |
| download | yuzu-1bdae0fe29f87daa81d2aba052a10a709b87485a.tar.gz yuzu-1bdae0fe29f87daa81d2aba052a10a709b87485a.tar.xz yuzu-1bdae0fe29f87daa81d2aba052a10a709b87485a.zip | |
common_func: Use std::array for INSERT_PADDING_* macros.
- Zero initialization here is useful for determinism.
Diffstat (limited to 'src/core/hle/service')
| -rw-r--r-- | src/core/hle/service/am/applets/error.cpp | 11 | ||||
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/service/am/applets/error.cpp b/src/core/hle/service/am/applets/error.cpp index a7db26725..eab0d42c9 100644 --- a/src/core/hle/service/am/applets/error.cpp +++ b/src/core/hle/service/am/applets/error.cpp | |||
| @@ -20,9 +20,9 @@ namespace Service::AM::Applets { | |||
| 20 | struct ShowError { | 20 | struct ShowError { |
| 21 | u8 mode; | 21 | u8 mode; |
| 22 | bool jump; | 22 | bool jump; |
| 23 | INSERT_PADDING_BYTES(4); | 23 | INSERT_UNION_PADDING_BYTES(4); |
| 24 | bool use_64bit_error_code; | 24 | bool use_64bit_error_code; |
| 25 | INSERT_PADDING_BYTES(1); | 25 | INSERT_UNION_PADDING_BYTES(1); |
| 26 | u64 error_code_64; | 26 | u64 error_code_64; |
| 27 | u32 error_code_32; | 27 | u32 error_code_32; |
| 28 | }; | 28 | }; |
| @@ -32,7 +32,7 @@ static_assert(sizeof(ShowError) == 0x14, "ShowError has incorrect size."); | |||
| 32 | struct ShowErrorRecord { | 32 | struct ShowErrorRecord { |
| 33 | u8 mode; | 33 | u8 mode; |
| 34 | bool jump; | 34 | bool jump; |
| 35 | INSERT_PADDING_BYTES(6); | 35 | INSERT_UNION_PADDING_BYTES(6); |
| 36 | u64 error_code_64; | 36 | u64 error_code_64; |
| 37 | u64 posix_time; | 37 | u64 posix_time; |
| 38 | }; | 38 | }; |
| @@ -41,7 +41,7 @@ static_assert(sizeof(ShowErrorRecord) == 0x18, "ShowErrorRecord has incorrect si | |||
| 41 | struct SystemErrorArg { | 41 | struct SystemErrorArg { |
| 42 | u8 mode; | 42 | u8 mode; |
| 43 | bool jump; | 43 | bool jump; |
| 44 | INSERT_PADDING_BYTES(6); | 44 | INSERT_UNION_PADDING_BYTES(6); |
| 45 | u64 error_code_64; | 45 | u64 error_code_64; |
| 46 | std::array<char, 8> language_code; | 46 | std::array<char, 8> language_code; |
| 47 | std::array<char, 0x800> main_text; | 47 | std::array<char, 0x800> main_text; |
| @@ -52,7 +52,7 @@ static_assert(sizeof(SystemErrorArg) == 0x1018, "SystemErrorArg has incorrect si | |||
| 52 | struct ApplicationErrorArg { | 52 | struct ApplicationErrorArg { |
| 53 | u8 mode; | 53 | u8 mode; |
| 54 | bool jump; | 54 | bool jump; |
| 55 | INSERT_PADDING_BYTES(6); | 55 | INSERT_UNION_PADDING_BYTES(6); |
| 56 | u32 error_code; | 56 | u32 error_code; |
| 57 | std::array<char, 8> language_code; | 57 | std::array<char, 8> language_code; |
| 58 | std::array<char, 0x800> main_text; | 58 | std::array<char, 0x800> main_text; |
| @@ -65,6 +65,7 @@ union Error::ErrorArguments { | |||
| 65 | ShowErrorRecord error_record; | 65 | ShowErrorRecord error_record; |
| 66 | SystemErrorArg system_error; | 66 | SystemErrorArg system_error; |
| 67 | ApplicationErrorArg application_error; | 67 | ApplicationErrorArg application_error; |
| 68 | std::array<u8, 0x1018> raw{}; | ||
| 68 | }; | 69 | }; |
| 69 | 70 | ||
| 70 | namespace { | 71 | namespace { |
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 199b30635..611cecc20 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -45,7 +45,7 @@ struct DisplayInfo { | |||
| 45 | 45 | ||
| 46 | /// Whether or not the display has a limited number of layers. | 46 | /// Whether or not the display has a limited number of layers. |
| 47 | u8 has_limited_layers{1}; | 47 | u8 has_limited_layers{1}; |
| 48 | INSERT_PADDING_BYTES(7){}; | 48 | INSERT_PADDING_BYTES(7); |
| 49 | 49 | ||
| 50 | /// Indicates the total amount of layers supported by the display. | 50 | /// Indicates the total amount of layers supported by the display. |
| 51 | /// @note This is only valid if has_limited_layers is set. | 51 | /// @note This is only valid if has_limited_layers is set. |