svc: Return random seed for svcGetInfo RandomEntropy
This commit is contained in:
parent
2a16fd7ffc
commit
cb1e63ef09
|
@ -34,6 +34,7 @@
|
|||
#include "core/hle/lock.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/service.h"
|
||||
#include "core/settings.h"
|
||||
|
||||
namespace Kernel {
|
||||
namespace {
|
||||
|
@ -558,7 +559,7 @@ static ResultCode GetInfo(u64* result, u64 info_id, u64 handle, u64 info_sub_id)
|
|||
*result = 0;
|
||||
break;
|
||||
case GetInfoType::RandomEntropy:
|
||||
*result = 0;
|
||||
*result = Settings::values.rng_seed.value_or(0);
|
||||
break;
|
||||
case GetInfoType::ASLRRegionBaseAddr:
|
||||
*result = vm_manager.GetASLRRegionBaseAddress();
|
||||
|
|
|
@ -140,7 +140,7 @@ ConfigureSystem::ConfigureSystem(QWidget* parent)
|
|||
connect(ui->rng_seed_checkbox, &QCheckBox::stateChanged, this, [this](bool checked) {
|
||||
ui->rng_seed_edit->setEnabled(checked);
|
||||
if (!checked)
|
||||
ui->rng_seed_edit->setText("0000000000000000");
|
||||
ui->rng_seed_edit->setText(QStringLiteral("0000000000000000"));
|
||||
});
|
||||
|
||||
scene = new QGraphicsScene;
|
||||
|
@ -164,8 +164,11 @@ void ConfigureSystem::setConfiguration() {
|
|||
|
||||
ui->rng_seed_checkbox->setChecked(Settings::values.rng_seed.has_value());
|
||||
ui->rng_seed_edit->setEnabled(Settings::values.rng_seed.has_value());
|
||||
ui->rng_seed_edit->setText(
|
||||
QString::fromStdString(fmt::format("{:016X}", Settings::values.rng_seed.value_or(0))));
|
||||
|
||||
const auto rng_seed = QString("%1")
|
||||
.arg(Settings::values.rng_seed.value_or(0), 16, 16, QLatin1Char{'0'})
|
||||
.toUpper();
|
||||
ui->rng_seed_edit->setText(rng_seed);
|
||||
}
|
||||
|
||||
void ConfigureSystem::PopulateUserList() {
|
||||
|
|
Reference in New Issue