diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/process_capability.cpp | 14 | ||||
| -rw-r--r-- | src/core/hle/kernel/process_capability.h | 5 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process_capability.cpp b/src/core/hle/kernel/process_capability.cpp index ef506b9f3..fb4467793 100644 --- a/src/core/hle/kernel/process_capability.cpp +++ b/src/core/hle/kernel/process_capability.cpp | |||
| @@ -315,7 +315,19 @@ ResultCode ProcessCapabilities::HandleProgramTypeFlags(u32 flags) { | |||
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | ResultCode ProcessCapabilities::HandleKernelVersionFlags(u32 flags) { | 317 | ResultCode ProcessCapabilities::HandleKernelVersionFlags(u32 flags) { |
| 318 | // TODO: Implement | 318 | // Yes, the internal member variable is checked in the actual kernel here. |
| 319 | // This might look odd for options that are only allowed to be initialized | ||
| 320 | // just once, however the kernel has a separate initialization function for | ||
| 321 | // kernel processes and userland processes. The kernel variant sets this | ||
| 322 | // member variable ahead of time. | ||
| 323 | |||
| 324 | const u32 major_version = kernel_version >> 19; | ||
| 325 | |||
| 326 | if (major_version != 0 || flags < 0x80000) { | ||
| 327 | return ERR_INVALID_CAPABILITY_DESCRIPTOR; | ||
| 328 | } | ||
| 329 | |||
| 330 | kernel_version = flags; | ||
| 319 | return RESULT_SUCCESS; | 331 | return RESULT_SUCCESS; |
| 320 | } | 332 | } |
| 321 | 333 | ||
diff --git a/src/core/hle/kernel/process_capability.h b/src/core/hle/kernel/process_capability.h index 140d60267..9a7da8bfa 100644 --- a/src/core/hle/kernel/process_capability.h +++ b/src/core/hle/kernel/process_capability.h | |||
| @@ -155,6 +155,11 @@ public: | |||
| 155 | return program_type; | 155 | return program_type; |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | /// Gets the kernel version value. | ||
| 159 | u32 GetKernelVersion() const { | ||
| 160 | return kernel_version; | ||
| 161 | } | ||
| 162 | |||
| 158 | private: | 163 | private: |
| 159 | /// Attempts to parse a given sequence of capability descriptors. | 164 | /// Attempts to parse a given sequence of capability descriptors. |
| 160 | /// | 165 | /// |