From d2e5dfb8cd0120200c3213040b06ea1b9c54e355 Mon Sep 17 00:00:00 2001 From: infinitefusion Date: Sun, 22 Dec 2024 16:56:31 -0500 Subject: [PATCH] Fixes crash when setting the device option twice --- Data/Scripts/052_AddOns/GameOptions.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Data/Scripts/052_AddOns/GameOptions.rb b/Data/Scripts/052_AddOns/GameOptions.rb index 5ad794924..639e40c34 100644 --- a/Data/Scripts/052_AddOns/GameOptions.rb +++ b/Data/Scripts/052_AddOns/GameOptions.rb @@ -200,8 +200,9 @@ class PokemonGameOption_Scene < PokemonOption_Scene "Prevents leveling above the next gym leader's highest leveled Pokemon" ) + device_option_selected=$PokemonSystem.on_mobile ? 1 : 0 options << EnumOption.new(_INTL("Device"), [_INTL("PC"), _INTL("Mobile")], - proc { $PokemonSystem.on_mobile }, + proc { device_option_selected }, proc { |value| $PokemonSystem.on_mobile = value == 1 }, ["The intended device on which to play the game.", "Disables some options that aren't supported when playing on mobile."]