summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc.cpp3
-rw-r--r--src/yuzu/configuration/configure_system.cpp9
2 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 7e8e87c33..0bfe1e3be 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -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();
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index b001266f6..67f07ecb1 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -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() {