strat: use svc:: over ::svc
This commit is contained in:
@@ -25,8 +25,8 @@ namespace ams::os::impl {
|
||||
/* Nintendo does not check the result of these invocations, but we will for safety. */
|
||||
/* Nintendo uses entropy values 0, 1 to seed the public TinyMT random, and values */
|
||||
/* 2, 3 to seed os::detail::RngManager's private TinyMT random. */
|
||||
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&seed[0]), InfoType_RandomEntropy, INVALID_HANDLE, 0));
|
||||
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&seed[2]), InfoType_RandomEntropy, INVALID_HANDLE, 1));
|
||||
R_ABORT_UNLESS(svc::GetInfo(reinterpret_cast<u64 *>(seed + 0), svc::InfoType_RandomEntropy, svc::InvalidHandle, 0));
|
||||
R_ABORT_UNLESS(svc::GetInfo(reinterpret_cast<u64 *>(seed + 2), svc::InfoType_RandomEntropy, svc::InvalidHandle, 1));
|
||||
|
||||
mt->Initialize(seed, util::size(seed));
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ namespace ams::os::impl {
|
||||
/* Nintendo does not check the result of these invocations, but we will for safety. */
|
||||
/* Nintendo uses entropy values 0, 1 to seed the public TinyMT random, and values */
|
||||
/* 2, 3 to seed os::detail::RngManager's private TinyMT random. */
|
||||
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&seed[0]), InfoType_RandomEntropy, INVALID_HANDLE, 2));
|
||||
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&seed[2]), InfoType_RandomEntropy, INVALID_HANDLE, 3));
|
||||
R_ABORT_UNLESS(svc::GetInfo(reinterpret_cast<u64 *>(seed + 0), svc::InfoType_RandomEntropy, svc::InvalidHandle, 2));
|
||||
R_ABORT_UNLESS(svc::GetInfo(reinterpret_cast<u64 *>(seed + 2), svc::InfoType_RandomEntropy, svc::InvalidHandle, 3));
|
||||
|
||||
this->mt.Initialize(seed, util::size(seed));
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ namespace ams::os {
|
||||
|
||||
namespace {
|
||||
|
||||
/* TODO: Remove, add VammManager */
|
||||
/* TODO: Remove, add VammManager/horizon-impl */
|
||||
size_t GetSystemResourceSize() {
|
||||
u64 v;
|
||||
if (R_SUCCEEDED(svcGetInfo(std::addressof(v), InfoType_SystemResourceSizeTotal, CUR_PROCESS_HANDLE, 0))) {
|
||||
if (R_SUCCEEDED(svc::GetInfo(std::addressof(v), svc::InfoType_SystemResourceSizeTotal, os::GetCurrentProcessHandle(), 0))) {
|
||||
return v;
|
||||
} else {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user