fix: OOBE always showing up on launch

This commit is contained in:
WerWolv 2025-08-17 15:50:37 +02:00
parent 4ade751caf
commit 682aae1497
1 changed files with 3 additions and 1 deletions

View File

@ -285,7 +285,9 @@ namespace hex::plugin::builtin {
EventImHexStartupFinished::subscribe([] {
const auto currVersion = ImHexApi::System::getImHexVersion();
const auto prevLaunchVersion = ContentRegistry::Settings::read<std::string>("hex.builtin.setting.general", "hex.builtin.setting.general.prev_launch_version", "");
if (prevLaunchVersion == "" || getEnvironmentVariable("IMHEX_FORCE_OOBE") != "0") {
const auto forceOobe = getEnvironmentVariable("IMHEX_FORCE_OOBE");
if (prevLaunchVersion == "" || (forceOobe.has_value() && *forceOobe != "0")) {
EventFirstLaunch::post();
return;
}