UI: Added file association for save states (and merged nsf+nsfe setting)
This commit is contained in:
parent
5e318fd614
commit
d0713b2775
7 changed files with 31 additions and 27 deletions
|
@ -51,7 +51,7 @@ std::unordered_map<string, string> MessageManager::_enResources = {
|
|||
{ "NetplayVersionMismatch", u8"%1 is not running the same version of Mesen and has been disconnected." },
|
||||
{ "PrgSizeWarning", u8"PRG size is smaller than 32kb" },
|
||||
{ "SaveStateEmpty", u8"Slot is empty." },
|
||||
{ "SaveStateIncompatibleVersion", u8"State #%1 is incompatible with this version of Mesen." },
|
||||
{ "SaveStateIncompatibleVersion", u8"Save state is incompatible with this version of Mesen." },
|
||||
{ "SaveStateInvalidFile", u8"Invalid save state file." },
|
||||
{ "SaveStateLoaded", u8"State #%1 loaded." },
|
||||
{ "SaveStateMissingRom", u8"Missing ROM required (%1) to load save state." },
|
||||
|
@ -121,7 +121,7 @@ std::unordered_map<string, string> MessageManager::_frResources = {
|
|||
{ "NetplayVersionMismatch", u8"%1 ne roule pas la même version de Mesen que vous et a été déconnecté automatiquement." },
|
||||
{ "PrgSizeWarning", u8"PRG size is smaller than 32kb" },
|
||||
{ "SaveStateEmpty", u8"Cette sauvegarde est vide." },
|
||||
{ "SaveStateIncompatibleVersion", u8"La sauvegarde #%1 est incompatible avec cette version de Mesen." },
|
||||
{ "SaveStateIncompatibleVersion", u8"La sauvegarde est incompatible avec cette version de Mesen." },
|
||||
{ "SaveStateInvalidFile", u8"Fichier de sauvegarde invalide ou corrompu." },
|
||||
{ "SaveStateLoaded", u8"Sauvegarde #%1 chargée." },
|
||||
{ "SaveStateMissingRom", u8"Le rom (%1) correspondant à la sauvegarde rapide sélectionnée est introuvable." },
|
||||
|
@ -183,19 +183,19 @@ std::unordered_map<string, string> MessageManager::_jaResources = {
|
|||
{ "MovieEnded", u8"動画の再生が終了しました。" },
|
||||
{ "MovieInvalid", u8"動画データの読み込みに失敗しました。" },
|
||||
{ "MovieMissingRom", u8"動画に必要なゲームファイルを見つかりませんでした。(%1)" },
|
||||
{ "MovieNewerVersion", u8"この動画は使用中のMesenより新しいバージョンで作られたため、ロードできません。 Mesenのサイトで最新のバージョンをダウンロードしてください。" },
|
||||
{ "MovieIncompatibleVersion", u8"この動画は古いMesenのバージョンで作られたもので、ロードできませんでした。" },
|
||||
{ "MovieNewerVersion", u8"この動画は使用中のMesenより新しいバージョンで作られたため、 ロードできません。 Mesenのサイトで最新のバージョンをダウンロードしてください。" },
|
||||
{ "MovieIncompatibleVersion", u8"この動画は古いMesenのバージョンで作られたもので、 ロードできませんでした。" },
|
||||
{ "MoviePlaying", u8"動画再生: %1" },
|
||||
{ "MovieRecordingTo", u8"%1に録画しています。" },
|
||||
{ "MovieSaved", u8"録画を終了しました: %1" },
|
||||
{ "NetplayVersionMismatch", u8"%1さんはMesenの別のバージョンを使っているため、接続はできませんでした。" },
|
||||
{ "PrgSizeWarning", u8"PRG size is smaller than 32kb" },
|
||||
{ "SaveStateEmpty", u8"セーブデータがありませんでした。" },
|
||||
{ "SaveStateIncompatibleVersion", u8"クイックセーブ%1は古いMesenのバージョンで作られたもので、ロードできませんでした。" },
|
||||
{ "SaveStateIncompatibleVersion", u8"クイックセーブデータは古いMesenのバージョンで作られたため、 ロードできませんでした。" },
|
||||
{ "SaveStateInvalidFile", u8"クイックセーブデータを読めませんでした。" },
|
||||
{ "SaveStateLoaded", u8"クイックセーブ%1をロードしました。" },
|
||||
{ "SaveStateMissingRom", u8"クイックセーブデータをロードするためのゲームファイルを見つかりませんでした。(%1)" },
|
||||
{ "SaveStateNewerVersion", u8"クイックセーブデータは使用中のMesenより新しいバージョンで作られたため、ロードできません。 Mesenのサイトで最新のバージョンをダウンロードしてください。" },
|
||||
{ "SaveStateNewerVersion", u8"クイックセーブデータは使用中のMesenより新しいバージョンで作られたため、 ロードできません。 Mesenのサイトで最新のバージョンをダウンロードしてください。" },
|
||||
{ "SaveStateSaved", u8"クイックセーブ%1をセーブしました。" },
|
||||
{ "SaveStateSlotSelected", u8"クイックセーブスロット%1。" },
|
||||
{ "ServerStarted", u8"サーバは起動しました (ポート: %1)" },
|
||||
|
@ -261,7 +261,7 @@ std::unordered_map<string, string> MessageManager::_ruResources = {
|
|||
{ "NetplayVersionMismatch", u8"Версия Mesen отличается. %1 был отключен." },
|
||||
{ "PrgSizeWarning", u8"Размер PRG меньше 32kb" },
|
||||
{ "SaveStateEmpty", u8"Слот пуст." },
|
||||
{ "SaveStateIncompatibleVersion", u8"Сохранение #%1 несовместимо с вашей версией Mesen." },
|
||||
{ "SaveStateIncompatibleVersion", u8"Сохранение несовместимо с вашей версией Mesen." },
|
||||
{ "SaveStateInvalidFile", u8"Некорректное сохранение." },
|
||||
{ "SaveStateLoaded", u8"Сохранение #%1 загружено." },
|
||||
{ "SaveStateMissingRom", u8"Missing ROM required (%1) to load save state." },
|
||||
|
@ -331,7 +331,7 @@ std::unordered_map<string, string> MessageManager::_esResources = {
|
|||
{ "NetplayVersionMismatch", u8"%1 no está ejecutando la misma versión de Mesen y ha sido desconectado." },
|
||||
{ "PrgSizeWarning", u8"El tamaño del PRG es menor de 32kb" },
|
||||
{ "SaveStateEmpty", u8"La partida guardada está vacía." },
|
||||
{ "SaveStateIncompatibleVersion", u8"Partida guardada #%1 incompatible con esta versión de Mesen." },
|
||||
{ "SaveStateIncompatibleVersion", u8"Partida guardada incompatible con esta versión de Mesen." },
|
||||
{ "SaveStateInvalidFile", u8"Partida guardada no válida." },
|
||||
{ "SaveStateLoaded", u8"Partida #%1 cargada." },
|
||||
{ "SaveStateMissingRom", u8"Missing ROM required (%1) to load save state." },
|
||||
|
@ -402,7 +402,7 @@ std::unordered_map<string, string> MessageManager::_ukResources = {
|
|||
{ "NetplayVersionMismatch", u8"Версія Mesen відрізняється. %1 був відключений." },
|
||||
{ "PrgSizeWarning", u8"Розмiр PRG менше 32kb" },
|
||||
{ "SaveStateEmpty", u8"Слот порожнiй." },
|
||||
{ "SaveStateIncompatibleVersion", u8"Збереження #%1 несумісне з вашою версією Mesen." },
|
||||
{ "SaveStateIncompatibleVersion", u8"Збереження несумісне з вашою версією Mesen." },
|
||||
{ "SaveStateInvalidFile", u8"Некоректне збереження." },
|
||||
{ "SaveStateLoaded", u8"Збереження #%1 завантажено." },
|
||||
{ "SaveStateMissingRom", u8"Missing ROM required (%1) to load save state." },
|
||||
|
@ -472,7 +472,7 @@ std::unordered_map<string, string> MessageManager::_ptResources = {
|
|||
{ "NetplayVersionMismatch", u8"%1 não está executando a mesma versão de Mesen e foi desconectado." },
|
||||
{ "PrgSizeWarning", u8"O tamanho de PRG é menor que 32kb" },
|
||||
{ "SaveStateEmpty", u8"O Save State está vazio." },
|
||||
{ "SaveStateIncompatibleVersion", u8"Save State #%1 incompatível com esta versão de Mesen." },
|
||||
{ "SaveStateIncompatibleVersion", u8"Save State incompatível com esta versão de Mesen." },
|
||||
{ "SaveStateInvalidFile", u8"Save State inválido." },
|
||||
{ "SaveStateLoaded", u8"Save State #%1 carregado." },
|
||||
{ "SaveStateMissingRom", u8"Missing ROM required (%1) to load save state." },
|
||||
|
@ -542,7 +542,7 @@ std::unordered_map<string, string> MessageManager::_caResources = {
|
|||
{ "NetplayVersionMismatch", u8"%1 no fa servir la vostra mateixa versió de Mesen i ha estat desconnectat automàticament." },
|
||||
{ "PrgSizeWarning", u8"La mida del PRG és més petit que 32kb" },
|
||||
{ "SaveStateEmpty", u8"Aquesta partida guardada és buida." },
|
||||
{ "SaveStateIncompatibleVersion", u8"La partida guardada nº%1 és incompatible amb aquesta versió de Mesen." },
|
||||
{ "SaveStateIncompatibleVersion", u8"La partida guardada és incompatible amb aquesta versió de Mesen." },
|
||||
{ "SaveStateInvalidFile", u8"Fitxer de partida guardada invàlid." },
|
||||
{ "SaveStateLoaded", u8"Partida guardada nº%1 carregada." },
|
||||
{ "SaveStateMissingRom", u8"No s'ha trobat la ROM necessària (%1) per carregar la partida guardada." },
|
||||
|
|
|
@ -128,7 +128,7 @@ bool SaveStateManager::LoadState(istream &stream, bool hashCheckRequired)
|
|||
|
||||
vector<char> nameBuffer(nameLength);
|
||||
stream.read(nameBuffer.data(), nameBuffer.size());
|
||||
string romName(nameBuffer.data());
|
||||
string romName(nameBuffer.data(), nameLength);
|
||||
|
||||
if(Console::GetHashInfo().Sha1Hash != string(hash)) {
|
||||
//Wrong game
|
||||
|
|
|
@ -76,7 +76,8 @@ namespace Mesen.GUI.Config
|
|||
CreateMimeType("x-mesen-nes", "nes", "NES Rom", mimeTypes, preferenceInfo.AssociateNesFiles);
|
||||
CreateMimeType("x-mesen-fds", "fds", "FDS Rom", mimeTypes, preferenceInfo.AssociateFdsFiles);
|
||||
CreateMimeType("x-mesen-nsf", "nsf", "Nintendo Sound File", mimeTypes, preferenceInfo.AssociateNsfFiles);
|
||||
CreateMimeType("x-mesen-nsfe", "nsfe", "Nintendo Sound File (extended)", mimeTypes, preferenceInfo.AssociateNsfeFiles);
|
||||
CreateMimeType("x-mesen-nsfe", "nsfe", "Nintendo Sound File (extended)", mimeTypes, preferenceInfo.AssociateNsfFiles);
|
||||
CreateMimeType("x-mesen-mst", "mst", "Mesen Save State", mimeTypes, preferenceInfo.AssociateMstFiles);
|
||||
CreateMimeType("x-mesen-mmo", "mmo", "Mesen Movie File", mimeTypes, preferenceInfo.AssociateMmoFiles);
|
||||
CreateMimeType("x-mesen-unif", "unf", "NES Rom (UNIF)", mimeTypes, preferenceInfo.AssociateUnfFiles);
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Mesen.GUI.Config
|
|||
public bool AssociateFdsFiles = false;
|
||||
public bool AssociateMmoFiles = false;
|
||||
public bool AssociateNsfFiles = false;
|
||||
public bool AssociateNsfeFiles = false;
|
||||
public bool AssociateMstFiles = false;
|
||||
public bool AssociateUnfFiles = false;
|
||||
|
||||
public bool NsfDisableApuIrqs = true;
|
||||
|
@ -160,8 +160,9 @@ namespace Mesen.GUI.Config
|
|||
FileAssociationHelper.UpdateFileAssociation("nes", preferenceInfo.AssociateNesFiles);
|
||||
FileAssociationHelper.UpdateFileAssociation("fds", preferenceInfo.AssociateFdsFiles);
|
||||
FileAssociationHelper.UpdateFileAssociation("mmo", preferenceInfo.AssociateMmoFiles);
|
||||
FileAssociationHelper.UpdateFileAssociation("mst", preferenceInfo.AssociateMstFiles);
|
||||
FileAssociationHelper.UpdateFileAssociation("nsf", preferenceInfo.AssociateNsfFiles);
|
||||
FileAssociationHelper.UpdateFileAssociation("nsfe", preferenceInfo.AssociateNsfeFiles);
|
||||
FileAssociationHelper.UpdateFileAssociation("nsfe", preferenceInfo.AssociateNsfFiles);
|
||||
FileAssociationHelper.UpdateFileAssociation("unf", preferenceInfo.AssociateUnfFiles);
|
||||
}
|
||||
|
||||
|
|
22
GUI.NET/Forms/Config/frmPreferences.Designer.cs
generated
22
GUI.NET/Forms/Config/frmPreferences.Designer.cs
generated
|
@ -114,7 +114,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.chkUnfFormat = new System.Windows.Forms.CheckBox();
|
||||
this.chkMmoFormat = new System.Windows.Forms.CheckBox();
|
||||
this.chkNsfFormat = new System.Windows.Forms.CheckBox();
|
||||
this.chkNsfeFormat = new System.Windows.Forms.CheckBox();
|
||||
this.chkMstFormat = new System.Windows.Forms.CheckBox();
|
||||
this.grpDataStorageLocation = new System.Windows.Forms.GroupBox();
|
||||
this.tableLayoutPanel7 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.tableLayoutPanel8 = new System.Windows.Forms.TableLayoutPanel();
|
||||
|
@ -1208,7 +1208,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.tlpFileFormat.Controls.Add(this.chkUnfFormat, 0, 2);
|
||||
this.tlpFileFormat.Controls.Add(this.chkMmoFormat, 1, 2);
|
||||
this.tlpFileFormat.Controls.Add(this.chkNsfFormat, 1, 0);
|
||||
this.tlpFileFormat.Controls.Add(this.chkNsfeFormat, 1, 1);
|
||||
this.tlpFileFormat.Controls.Add(this.chkMstFormat, 1, 1);
|
||||
this.tlpFileFormat.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tlpFileFormat.Location = new System.Drawing.Point(3, 16);
|
||||
this.tlpFileFormat.Name = "tlpFileFormat";
|
||||
|
@ -1268,18 +1268,18 @@ namespace Mesen.GUI.Forms.Config
|
|||
this.chkNsfFormat.Name = "chkNsfFormat";
|
||||
this.chkNsfFormat.Size = new System.Drawing.Size(171, 17);
|
||||
this.chkNsfFormat.TabIndex = 14;
|
||||
this.chkNsfFormat.Text = ".NSF (Nintendo Sound Format)";
|
||||
this.chkNsfFormat.Text = ".NSF/.NSFE (Nintendo Sound Format)";
|
||||
this.chkNsfFormat.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkMstFormat
|
||||
//
|
||||
this.chkNsfeFormat.AutoSize = true;
|
||||
this.chkNsfeFormat.Location = new System.Drawing.Point(238, 26);
|
||||
this.chkNsfeFormat.Name = "chkMstFormat";
|
||||
this.chkNsfeFormat.Size = new System.Drawing.Size(226, 17);
|
||||
this.chkNsfeFormat.TabIndex = 15;
|
||||
this.chkNsfeFormat.Text = ".NSFE (Nintendo Sound Format Extended)";
|
||||
this.chkNsfeFormat.UseVisualStyleBackColor = true;
|
||||
this.chkMstFormat.AutoSize = true;
|
||||
this.chkMstFormat.Location = new System.Drawing.Point(238, 26);
|
||||
this.chkMstFormat.Name = "chkMstFormat";
|
||||
this.chkMstFormat.Size = new System.Drawing.Size(226, 17);
|
||||
this.chkMstFormat.TabIndex = 15;
|
||||
this.chkMstFormat.Text = ".MST (Mesen Save State)";
|
||||
this.chkMstFormat.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// grpDataStorageLocation
|
||||
//
|
||||
|
@ -1766,7 +1766,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
private System.Windows.Forms.Label lblLastSyncDateTime;
|
||||
private System.Windows.Forms.Timer tmrSyncDateTime;
|
||||
private System.Windows.Forms.Button btnResync;
|
||||
private System.Windows.Forms.CheckBox chkNsfeFormat;
|
||||
private System.Windows.Forms.CheckBox chkMstFormat;
|
||||
private System.Windows.Forms.CheckBox chkNsfFormat;
|
||||
private System.Windows.Forms.TabPage tpgAdvanced;
|
||||
private System.Windows.Forms.TabPage tpgNsf;
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Mesen.GUI.Forms.Config
|
|||
AddBinding("AssociateFdsFiles", chkFdsFormat);
|
||||
AddBinding("AssociateMmoFiles", chkMmoFormat);
|
||||
AddBinding("AssociateNsfFiles", chkNsfFormat);
|
||||
AddBinding("AssociateNsfeFiles", chkNsfeFormat);
|
||||
AddBinding("AssociateMstFiles", chkMstFormat);
|
||||
AddBinding("AssociateUnfFiles", chkUnfFormat);
|
||||
|
||||
AddBinding("NsfAutoDetectSilence", chkNsfAutoDetectSilence);
|
||||
|
|
|
@ -162,6 +162,8 @@ namespace Mesen.GUI.Forms
|
|||
if(File.Exists(filename)) {
|
||||
if(IsPatchFile(filename)) {
|
||||
LoadPatchFile(filename);
|
||||
} else if(Path.GetExtension(filename).ToLowerInvariant() == ".mst") {
|
||||
InteropEmu.LoadStateFile(filename);
|
||||
} else if(Path.GetExtension(filename).ToLowerInvariant() == ".mmo") {
|
||||
InteropEmu.MoviePlay(filename);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue