summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-13 18:25:43 +0100
committerZach Hilman <zachhilman@gmail.com>2018-11-13 18:26:03 +0100
commitab552e4a252b66ca02c04724a1773edbefec6837 (patch)
tree544702301230e785639d7ff4cfbaa2e99294a4b9 /src/core/hle/kernel/svc.cpp
parentMerge pull request #1628 from greggameplayer/Texture2DArray (diff)
downloadyuzu-ab552e4a252b66ca02c04724a1773edbefec6837.tar
yuzu-ab552e4a252b66ca02c04724a1773edbefec6837.tar.gz
yuzu-ab552e4a252b66ca02c04724a1773edbefec6837.tar.bz2
yuzu-ab552e4a252b66ca02c04724a1773edbefec6837.tar.lz
yuzu-ab552e4a252b66ca02c04724a1773edbefec6837.tar.xz
yuzu-ab552e4a252b66ca02c04724a1773edbefec6837.tar.zst
yuzu-ab552e4a252b66ca02c04724a1773edbefec6837.zip
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 0bfe1e3be..b0b6508d9 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -559,7 +559,16 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
*result = 0;
break;
case GetInfoType::RandomEntropy:
- *result = Settings::values.rng_seed.value_or(0);
+ if (handle != 0) {
+ return ERR_INVALID_HANDLE;
+ }
+
+ if (info_sub_id >= Process::RANDOM_ENTROPY_SIZE) {
+ return ERR_INVALID_COMBINATION_KERNEL;
+ }
+
+ *result = current_process->GetRandomEntropy(info_sub_id);
+ return RESULT_SUCCESS;
break;
case GetInfoType::ASLRRegionBaseAddr:
*result = vm_manager.GetASLRRegionBaseAddress();