diff --git a/PKX/f1-Main.cs b/PKX/f1-Main.cs index 379b13789..a90d48072 100644 --- a/PKX/f1-Main.cs +++ b/PKX/f1-Main.cs @@ -580,7 +580,7 @@ private void open1MB(byte[] input, string path, string GameType, bool oras) Array.Copy(savefile, 0x43C - 1 * 0x130, realHash2, 0, 0x20); B_SwitchSAV.Enabled = (hashValue1.SequenceEqual(realHash1) && hashValue2.SequenceEqual(realHash2)); - getSAVOffsets(); // just in case + getSAVOffsets(); // to detect if we are ORAS or not Array.Copy(savefile, 0x5400 + 0x7F000 * savindex, cyberSAV, 0, cyberSAV.Length); openSave(oras); @@ -3602,10 +3602,16 @@ private void getSAVOffsets() // Get the save file offsets for the input game bool enableInterface = false; if (BitConverter.ToUInt32(savefile, 0x6A810 + 0x7F000 * savindex) == 0x42454546) - { + { enableInterface = true; SaveGame = new PKX.Structures.SaveGame("XY"); } + else if (BitConverter.ToUInt32(savefile, 0x7B210 + 0x7F000 * savindex) == 0x42454546) + { + enableInterface = true; + SaveGame = new PKX.Structures.SaveGame("ORAS"); + savegame_oras = true; + } else { Util.Error("Unrecognized Save File loaded.");