diff --git a/Core/AutoSaveManager.h b/Core/AutoSaveManager.h index 0e789d48..7dc915a3 100644 --- a/Core/AutoSaveManager.h +++ b/Core/AutoSaveManager.h @@ -7,7 +7,7 @@ class AutoSaveManager { private: - const uint32_t _autoSaveSlot = 8; + const uint32_t _autoSaveSlot = 11; std::thread _autoSaveThread; atomic _stopThread; diff --git a/Core/EmulationSettings.h b/Core/EmulationSettings.h index aea29bad..e3112eb6 100644 --- a/Core/EmulationSettings.h +++ b/Core/EmulationSettings.h @@ -453,6 +453,9 @@ enum class EmulatorShortcut SaveStateSlot5, SaveStateSlot6, SaveStateSlot7, + SaveStateSlot8, + SaveStateSlot9, + SaveStateSlot10, SaveStateToFile, LoadStateSlot1, @@ -463,6 +466,9 @@ enum class EmulatorShortcut LoadStateSlot6, LoadStateSlot7, LoadStateSlot8, + LoadStateSlot9, + LoadStateSlot10, + LoadStateSlotAuto, LoadStateFromFile, OpenFile, diff --git a/Core/SaveStateManager.h b/Core/SaveStateManager.h index c2a9b1e4..37db7671 100644 --- a/Core/SaveStateManager.h +++ b/Core/SaveStateManager.h @@ -5,7 +5,7 @@ class SaveStateManager { private: - static const uint32_t MaxIndex = 7; + static const uint32_t MaxIndex = 10; static atomic _lastIndex; static string GetStateFilepath(int stateIndex); diff --git a/GUI.NET/Config/PreferenceInfo.cs b/GUI.NET/Config/PreferenceInfo.cs index 63fbd8e7..3e41e648 100644 --- a/GUI.NET/Config/PreferenceInfo.cs +++ b/GUI.NET/Config/PreferenceInfo.cs @@ -141,7 +141,7 @@ namespace Mesen.GUI.Config ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.LoadStateSlot5, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("F5") })); ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.LoadStateSlot6, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("F6") })); ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.LoadStateSlot7, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("F7") })); - ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.LoadStateSlot8, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("F8") })); + ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.LoadStateSlotAuto, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("F8") })); ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.LoadStateFromFile, new KeyCombination() { Key1 = InteropEmu.GetKeyCode("Ctrl"), Key2 = InteropEmu.GetKeyCode("L") })); ShortcutKeys2 = new List(); diff --git a/GUI.NET/Dependencies/resources.ca.xml b/GUI.NET/Dependencies/resources.ca.xml index 45fe7dc1..133ee3d4 100644 --- a/GUI.NET/Dependencies/resources.ca.xml +++ b/GUI.NET/Dependencies/resources.ca.xml @@ -375,7 +375,7 @@ Còpies de seguretat Desat de partida Desa automàticament cada - minuts (prem F8 per a carregar-la) + minuts Mostrar una notificación en pantalla al hacer la copia de seguridad automática Allow save states to be loaded on modified ROMs (e.g IPS patches) @@ -814,6 +814,9 @@ Desa la partida - Posició 5 Desa la partida - Posició 6 Desa la partida - Posició 7 + Desa la partida - Posició 8 + Desa la partida - Posició 9 + Desa la partida - Posició 10 Desa la partida a un fitxer Carrega la partida - Posició 1 Carrega la partida - Posició 2 @@ -823,6 +826,9 @@ Carrega la partida - Posició 6 Carrega la partida - Posició 7 Carrega la partida - Posició 8 + Carrega la partida - Posició 9 + Carrega la partida - Posició 10 + Load State - Auto Save Slot Carrega la partida des d'un fitxer Obre un fitxer Obre el depurador diff --git a/GUI.NET/Dependencies/resources.en.xml b/GUI.NET/Dependencies/resources.en.xml index b2671875..146d2222 100644 --- a/GUI.NET/Dependencies/resources.en.xml +++ b/GUI.NET/Dependencies/resources.en.xml @@ -145,6 +145,9 @@ Save State - Slot 5 Save State - Slot 6 Save State - Slot 7 + Save State - Slot 8 + Save State - Slot 9 + Save State - Slot 10 Save State to File Load State - Slot 1 Load State - Slot 2 @@ -154,6 +157,9 @@ Load State - Slot 6 Load State - Slot 7 Load State - Slot 8 + Load State - Slot 9 + Load State - Slot 10 + Load State - Auto Save Slot Load State from File Open File Open Debugger diff --git a/GUI.NET/Dependencies/resources.es.xml b/GUI.NET/Dependencies/resources.es.xml index 27f6d900..7e8314ca 100644 --- a/GUI.NET/Dependencies/resources.es.xml +++ b/GUI.NET/Dependencies/resources.es.xml @@ -374,7 +374,7 @@ Copias de seguridad Guardado de estado Crear una copia de seguridad de cada estado - minutos (Pulse F8 para cargar) + minutos Mostrar una notificación en pantalla al hacer la copia de seguridad automática Allow save states to be loaded on modified ROMs (e.g IPS patches) Copia de seguridad online @@ -831,6 +831,9 @@ Guardar partida - Hueco 5 Guardar partida - Hueco 6 Guardar partida - Hueco 7 + Guardar partida - Hueco 8 + Guardar partida - Hueco 9 + Guardar partida - Hueco 10 Guardar partida en archivo Cargar partida - Hueco 1 Cargar partida - Hueco 2 @@ -840,6 +843,9 @@ Cargar partida - Hueco 6 Cargar partida - Hueco 7 Cargar partida - Hueco 8 + Cargar partida - Hueco 9 + Cargar partida - Hueco 10 + Load State - Auto Save Slot Cargar partida de archivo Abrir archivo Abrir depurador diff --git a/GUI.NET/Dependencies/resources.fr.xml b/GUI.NET/Dependencies/resources.fr.xml index f51f24d1..e6a1f71a 100644 --- a/GUI.NET/Dependencies/resources.fr.xml +++ b/GUI.NET/Dependencies/resources.fr.xml @@ -384,7 +384,7 @@ Sauvegardes Sauvegardes d'état Créer une sauvegarde d'état à chaque - minutes (Appuyer sur F8 pour charger) + minutes Afficher une notification à l'écran au moment de la sauvegarde automatique Permettre le chargement de sauvegardes créés dans un autre ROM (ex: IPS) @@ -844,6 +844,9 @@ Sauvegarde d'état - Position 5 Sauvegarde d'état - Position 6 Sauvegarde d'état - Position 7 + Sauvegarde d'état - Position 8 + Sauvegarde d'état - Position 9 + Sauvegarde d'état - Position 10 Sauvergarde l'état dans un fichier Chargement d'état - Position 1 Chargement d'état - Position 2 @@ -853,6 +856,9 @@ Chargement d'état - Position 6 Chargement d'état - Position 7 Chargement d'état - Position 8 + Chargement d'état - Position 9 + Chargement d'état - Position 10 + Chargement d'état - Sauvegarde auto Charger l'état à partir d'un fichier Ouvrir un fichier Ouvrir le débogueur diff --git a/GUI.NET/Dependencies/resources.ja.xml b/GUI.NET/Dependencies/resources.ja.xml index 9bbb891c..d93beef6 100644 --- a/GUI.NET/Dependencies/resources.ja.xml +++ b/GUI.NET/Dependencies/resources.ja.xml @@ -384,7 +384,7 @@ セーブデータ クイックセーブ オートクイックセーブを - 分おきにする(F8でクイックロード) + 分おきにする オートクイックセーブする際、通信を表示する 違うROMで作られたクイックセーブをロード可能にする @@ -828,6 +828,9 @@ クイックセーブスロット5に保存する クイックセーブスロット6に保存する クイックセーブスロット7に保存する + クイックセーブスロット8に保存する + クイックセーブスロット9に保存する + クイックセーブスロット10に保存する クイックセーブデータをファイルに保存する クイックセーブスロット1からロードする クイックセーブスロット2からロードする @@ -837,6 +840,9 @@ クイックセーブスロット6からロードする クイックセーブスロット7からロードする クイックセーブスロット8からロードする + クイックセーブスロット9からロードする + クイックセーブスロット10からロードする + 自動クイックセーブスロットからロードする クイックセーブデータをファイルからロードする ファイルを開く デバッガを開く diff --git a/GUI.NET/Dependencies/resources.pt.xml b/GUI.NET/Dependencies/resources.pt.xml index 26a4a53d..72f7dbfb 100644 --- a/GUI.NET/Dependencies/resources.pt.xml +++ b/GUI.NET/Dependencies/resources.pt.xml @@ -372,7 +372,7 @@ Cópias de segurança Salvar estado Salvar estado do jogo automaticamente a cada - minutos (Aperte F8 para carregar) + minutos Mostrar uma notificação na tela ao fazer a cópia de segurança automática Allow save states to be loaded on modified ROMs (e.g IPS patches) Cópia de segurança online @@ -829,6 +829,9 @@ Salvar estado - Compartimento 5 Salvar estado - Compartimento 6 Salvar estado - Compartimento 7 + Salvar estado - Compartimento 8 + Salvar estado - Compartimento 9 + Salvar estado - Compartimento 10 Salvar estado para arquivo Carregar estado - Compartimento 1 Carregar estado - Compartimento 2 @@ -838,6 +841,9 @@ Carregar estado - Compartimento 6 Carregar estado - Compartimento 7 Carregar estado - Compartimento 8 + Carregar estado - Compartimento 9 + Carregar estado - Compartimento 10 + Load State - Auto Save Slot Carregar estado de arquivo Abrir arquivo Abrir depurador diff --git a/GUI.NET/Dependencies/resources.ru.xml b/GUI.NET/Dependencies/resources.ru.xml index 5651eb93..632a9396 100644 --- a/GUI.NET/Dependencies/resources.ru.xml +++ b/GUI.NET/Dependencies/resources.ru.xml @@ -382,7 +382,7 @@ Сохранения Сохранения Автоматически создавать сохранения через - минут (нажмите F8 для загрузки) + минут Оповещать при сохранении Allow save states to be loaded on modified ROMs (e.g IPS patches) @@ -833,6 +833,9 @@ Save State - Slot 5 Save State - Slot 6 Save State - Slot 7 + Save State - Slot 8 + Save State - Slot 9 + Save State - Slot 10 Save State to File Load State - Slot 1 Load State - Slot 2 @@ -842,6 +845,9 @@ Load State - Slot 6 Load State - Slot 7 Load State - Slot 8 + Load State - Slot 9 + Load State - Slot 10 + Load State - Auto Save Slot Load State from File Open File Open Debugger diff --git a/GUI.NET/Dependencies/resources.uk.xml b/GUI.NET/Dependencies/resources.uk.xml index c2e16744..a6060e11 100644 --- a/GUI.NET/Dependencies/resources.uk.xml +++ b/GUI.NET/Dependencies/resources.uk.xml @@ -382,7 +382,7 @@ Збереження Збереження Автоматично створювати збереження через - хвилин (натисніть F8 для завантаження) + хвилин Сповіщати при збереженні Allow save states to be loaded on modified ROMs (e.g IPS patches) @@ -833,6 +833,9 @@ Save State - Slot 5 Save State - Slot 6 Save State - Slot 7 + Save State - Slot 8 + Save State - Slot 9 + Save State - Slot 10 Зберегти стан в файл Load State - Slot 1 Load State - Slot 2 @@ -842,6 +845,9 @@ Load State - Slot 6 Load State - Slot 7 Load State - Slot 8 + Load State - Slot 9 + Load State - Slot 10 + Load State - Auto Save Slot Завантажити стан з файлу Відкрити файл Відкрити Debugger diff --git a/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs b/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs index 2a21d0a1..ed120ae4 100644 --- a/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs +++ b/GUI.NET/Forms/Config/ctrlEmulatorShortcuts.cs @@ -95,6 +95,9 @@ namespace Mesen.GUI.Forms.Config EmulatorShortcut.SaveStateSlot5, EmulatorShortcut.SaveStateSlot6, EmulatorShortcut.SaveStateSlot7, + EmulatorShortcut.SaveStateSlot8, + EmulatorShortcut.SaveStateSlot9, + EmulatorShortcut.SaveStateSlot10, EmulatorShortcut.SaveStateToFile, EmulatorShortcut.LoadStateSlot1, @@ -105,6 +108,9 @@ namespace Mesen.GUI.Forms.Config EmulatorShortcut.LoadStateSlot6, EmulatorShortcut.LoadStateSlot7, EmulatorShortcut.LoadStateSlot8, + EmulatorShortcut.LoadStateSlot9, + EmulatorShortcut.LoadStateSlot10, + EmulatorShortcut.LoadStateSlotAuto, EmulatorShortcut.LoadStateFromFile, }; diff --git a/GUI.NET/Forms/Config/frmPreferences.Designer.cs b/GUI.NET/Forms/Config/frmPreferences.Designer.cs index c39bc8d4..2740093c 100644 --- a/GUI.NET/Forms/Config/frmPreferences.Designer.cs +++ b/GUI.NET/Forms/Config/frmPreferences.Designer.cs @@ -787,7 +787,7 @@ namespace Mesen.GUI.Forms.Config this.lblAutoSave.Name = "lblAutoSave"; this.lblAutoSave.Size = new System.Drawing.Size(99, 13); this.lblAutoSave.TabIndex = 2; - this.lblAutoSave.Text = "minutes (F8 to load)"; + this.lblAutoSave.Text = "minutes"; // // tpgNsf // diff --git a/GUI.NET/Forms/frmMain.Designer.cs b/GUI.NET/Forms/frmMain.Designer.cs index 3351028b..d6e7eec8 100644 --- a/GUI.NET/Forms/frmMain.Designer.cs +++ b/GUI.NET/Forms/frmMain.Designer.cs @@ -347,50 +347,50 @@ namespace Mesen.GUI.Forms // this.mnuOpen.Image = global::Mesen.GUI.Properties.Resources.FolderOpen; this.mnuOpen.Name = "mnuOpen"; - this.mnuOpen.Size = new System.Drawing.Size(136, 22); + this.mnuOpen.Size = new System.Drawing.Size(152, 22); this.mnuOpen.Text = "Open"; // // toolStripMenuItem4 // this.toolStripMenuItem4.Name = "toolStripMenuItem4"; - this.toolStripMenuItem4.Size = new System.Drawing.Size(133, 6); + this.toolStripMenuItem4.Size = new System.Drawing.Size(149, 6); // // mnuSaveState // this.mnuSaveState.Name = "mnuSaveState"; - this.mnuSaveState.Size = new System.Drawing.Size(136, 22); + this.mnuSaveState.Size = new System.Drawing.Size(152, 22); this.mnuSaveState.Text = "Save State"; this.mnuSaveState.DropDownOpening += new System.EventHandler(this.mnuSaveState_DropDownOpening); // // mnuLoadState // this.mnuLoadState.Name = "mnuLoadState"; - this.mnuLoadState.Size = new System.Drawing.Size(136, 22); + this.mnuLoadState.Size = new System.Drawing.Size(152, 22); this.mnuLoadState.Text = "Load State"; this.mnuLoadState.DropDownOpening += new System.EventHandler(this.mnuLoadState_DropDownOpening); // // toolStripMenuItem7 // this.toolStripMenuItem7.Name = "toolStripMenuItem7"; - this.toolStripMenuItem7.Size = new System.Drawing.Size(133, 6); + this.toolStripMenuItem7.Size = new System.Drawing.Size(149, 6); // // mnuRecentFiles // this.mnuRecentFiles.Name = "mnuRecentFiles"; - this.mnuRecentFiles.Size = new System.Drawing.Size(136, 22); + this.mnuRecentFiles.Size = new System.Drawing.Size(152, 22); this.mnuRecentFiles.Text = "Recent Files"; this.mnuRecentFiles.DropDownOpening += new System.EventHandler(this.mnuRecentFiles_DropDownOpening); // // toolStripMenuItem6 // this.toolStripMenuItem6.Name = "toolStripMenuItem6"; - this.toolStripMenuItem6.Size = new System.Drawing.Size(133, 6); + this.toolStripMenuItem6.Size = new System.Drawing.Size(149, 6); // // mnuExit // this.mnuExit.Image = global::Mesen.GUI.Properties.Resources.Exit; this.mnuExit.Name = "mnuExit"; - this.mnuExit.Size = new System.Drawing.Size(136, 22); + this.mnuExit.Size = new System.Drawing.Size(152, 22); this.mnuExit.Text = "Exit"; // // mnuGame diff --git a/GUI.NET/Forms/frmMain.File.cs b/GUI.NET/Forms/frmMain.File.cs index eb6c5d4e..6f23dc1d 100644 --- a/GUI.NET/Forms/frmMain.File.cs +++ b/GUI.NET/Forms/frmMain.File.cs @@ -13,7 +13,7 @@ namespace Mesen.GUI.Forms { partial class frmMain { - const int NumberOfSaveSlots = 7; + const int NumberOfSaveSlots = 10; private void UpdateStateMenu(ToolStripMenuItem menu, bool forSave) { if(this.InvokeRequired) { @@ -22,11 +22,14 @@ namespace Mesen.GUI.Forms for(uint i = 1; i <= frmMain.NumberOfSaveSlots + (forSave ? 0 : 1); i++) { Int64 fileTime = InteropEmu.GetStateInfo(i); string label; + bool isAutoSaveSlot = i == NumberOfSaveSlots + 1; + string slotName = isAutoSaveSlot ? "Auto" : i.ToString(); + if(fileTime == 0) { - label = i.ToString() + ". " + ResourceHelper.GetMessage("EmptyState"); + label = slotName + ". " + ResourceHelper.GetMessage("EmptyState"); } else { DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(fileTime).ToLocalTime(); - label = i.ToString() + ". " + dateTime.ToShortDateString() + " " + dateTime.ToShortTimeString(); + label = slotName + ". " + dateTime.ToShortDateString() + " " + dateTime.ToShortTimeString(); } if(i == NumberOfSaveSlots + 1) { @@ -42,9 +45,7 @@ namespace Mesen.GUI.Forms private void InitializeStateMenu(ToolStripMenuItem menu, bool forSave) { Action addSaveStateInfo = (i) => { - string label = i.ToString() + ". " + ResourceHelper.GetMessage("EmptyState"); - - ToolStripMenuItem item = new ToolStripMenuItem(label); + ToolStripMenuItem item = new ToolStripMenuItem(); menu.DropDownItems.Add(item); if(forSave) { diff --git a/GUI.NET/Forms/frmMain.Help.cs b/GUI.NET/Forms/frmMain.Help.cs index adcc6987..de24eb11 100644 --- a/GUI.NET/Forms/frmMain.Help.cs +++ b/GUI.NET/Forms/frmMain.Help.cs @@ -75,6 +75,23 @@ namespace Mesen.GUI.Forms } } + if(oldVersion <= new Version("0.9.4")) { + ShortcutKeyInfo oldLoadAutoSlot1 = ConfigManager.Config.PreferenceInfo.ShortcutKeys1.Where(o => o.Shortcut == EmulatorShortcut.LoadStateSlot8).FirstOrDefault(); + ShortcutKeyInfo oldLoadAutoSlot2 = ConfigManager.Config.PreferenceInfo.ShortcutKeys2.Where(o => o.Shortcut == EmulatorShortcut.LoadStateSlot8).FirstOrDefault(); + ShortcutKeyInfo newLoadAutoSlot1 = ConfigManager.Config.PreferenceInfo.ShortcutKeys1.Where(o => o.Shortcut == EmulatorShortcut.LoadStateSlotAuto).FirstOrDefault(); + ShortcutKeyInfo newLoadAutoSlot2 = ConfigManager.Config.PreferenceInfo.ShortcutKeys2.Where(o => o.Shortcut == EmulatorShortcut.LoadStateSlotAuto).FirstOrDefault(); + + //Copy old "Load State - Slot 8" shortcut to "Load State - Auto Save Slot" + if(oldLoadAutoSlot1 != null && !oldLoadAutoSlot1.KeyCombination.IsEmpty && newLoadAutoSlot1 == null) { + ConfigManager.Config.PreferenceInfo.ShortcutKeys1.Add(new ShortcutKeyInfo(EmulatorShortcut.LoadStateSlotAuto, oldLoadAutoSlot1.KeyCombination)); + oldLoadAutoSlot1.KeyCombination = new KeyCombination(); + } + if(oldLoadAutoSlot2 != null && !oldLoadAutoSlot2.KeyCombination.IsEmpty && newLoadAutoSlot2 == null) { + ConfigManager.Config.PreferenceInfo.ShortcutKeys2.Add(new ShortcutKeyInfo(EmulatorShortcut.LoadStateSlotAuto, oldLoadAutoSlot2.KeyCombination)); + oldLoadAutoSlot2.KeyCombination = new KeyCombination(); + } + } + ConfigManager.Config.MesenVersion = InteropEmu.GetMesenVersion(); ConfigManager.ApplyChanges(); diff --git a/GUI.NET/Forms/frmMain.cs b/GUI.NET/Forms/frmMain.cs index aa4d629a..78ca2b94 100644 --- a/GUI.NET/Forms/frmMain.cs +++ b/GUI.NET/Forms/frmMain.cs @@ -774,6 +774,9 @@ namespace Mesen.GUI.Forms case EmulatorShortcut.SaveStateSlot5: SaveState(5); break; case EmulatorShortcut.SaveStateSlot6: SaveState(6); break; case EmulatorShortcut.SaveStateSlot7: SaveState(7); break; + case EmulatorShortcut.SaveStateSlot8: SaveState(8); break; + case EmulatorShortcut.SaveStateSlot9: SaveState(9); break; + case EmulatorShortcut.SaveStateSlot10: SaveState(10); break; case EmulatorShortcut.LoadStateSlot1: LoadState(1); break; case EmulatorShortcut.LoadStateSlot2: LoadState(2); break; case EmulatorShortcut.LoadStateSlot3: LoadState(3); break; @@ -782,6 +785,9 @@ namespace Mesen.GUI.Forms case EmulatorShortcut.LoadStateSlot6: LoadState(6); break; case EmulatorShortcut.LoadStateSlot7: LoadState(7); break; case EmulatorShortcut.LoadStateSlot8: LoadState(8); break; + case EmulatorShortcut.LoadStateSlot9: LoadState(9); break; + case EmulatorShortcut.LoadStateSlot10: LoadState(10); break; + case EmulatorShortcut.LoadStateSlotAuto: LoadState(11); break; } if(restoreFullscreen && _frmFullscreenRenderer == null) { diff --git a/GUI.NET/InteropEmu.cs b/GUI.NET/InteropEmu.cs index 0846e028..6d834131 100644 --- a/GUI.NET/InteropEmu.cs +++ b/GUI.NET/InteropEmu.cs @@ -1750,6 +1750,9 @@ namespace Mesen.GUI SaveStateSlot5, SaveStateSlot6, SaveStateSlot7, + SaveStateSlot8, + SaveStateSlot9, + SaveStateSlot10, SaveStateToFile, LoadStateSlot1, @@ -1760,6 +1763,9 @@ namespace Mesen.GUI LoadStateSlot6, LoadStateSlot7, LoadStateSlot8, + LoadStateSlot9, + LoadStateSlot10, + LoadStateSlotAuto, LoadStateFromFile, OpenFile,