From 2cbae24ded05dfb4aff0a46ca0ec1c5ac862a1a4 Mon Sep 17 00:00:00 2001 From: Souryo Date: Fri, 9 Dec 2016 12:49:17 -0500 Subject: [PATCH] UI: Added "Load Random Game" option --- Core/Console.cpp | 6 +- GUI.NET/Dependencies/resources.en.xml | 2 + GUI.NET/Dependencies/resources.es.xml | 5 ++ GUI.NET/Dependencies/resources.fr.xml | 3 + GUI.NET/Dependencies/resources.ja.xml | 3 + GUI.NET/Dependencies/resources.ru.xml | 3 + GUI.NET/Dependencies/resources.uk.xml | 3 + GUI.NET/Forms/frmMain.Designer.cs | 70 +++++++++++++---------- GUI.NET/Forms/frmMain.cs | 23 +++++++- GUI.NET/GUI.NET.csproj | 1 + GUI.NET/InteropEmu.cs | 2 +- GUI.NET/Properties/Resources.Designer.cs | 10 ++++ GUI.NET/Properties/Resources.resx | 3 + GUI.NET/Resources/Dice.png | Bin 0 -> 1034 bytes InteropDLL/ConsoleWrapper.cpp | 2 +- Utilities/FolderUtilities.cpp | 4 +- Utilities/FolderUtilities.h | 4 +- 17 files changed, 105 insertions(+), 39 deletions(-) create mode 100644 GUI.NET/Resources/Dice.png diff --git a/Core/Console.cpp b/Core/Console.cpp index 0a35ea1e..d8451573 100644 --- a/Core/Console.cpp +++ b/Core/Console.cpp @@ -94,7 +94,7 @@ void Console::Initialize(string romFilename, stringstream *filestream, string ip VideoDecoder::GetInstance()->StartThread(); - FolderUtilities::AddKnowGameFolder(FolderUtilities::GetFolderName(romFilename)); + FolderUtilities::AddKnownGameFolder(FolderUtilities::GetFolderName(romFilename)); string modelName = _model == NesModel::PAL ? "PAL" : (_model == NesModel::Dendy ? "Dendy" : "NTSC"); string messageTitle = MessageManager::Localize("GameLoaded") + " (" + modelName + ")"; @@ -126,7 +126,7 @@ bool Console::LoadROM(string filename, uint32_t crc32Hash) } int32_t archiveFileIndex = -1; - for(string folder : FolderUtilities::GetKnowGameFolders()) { + for(string folder : FolderUtilities::GetKnownGameFolders()) { string match = RomLoader::FindMatchingRomInFolder(folder, filename, crc32Hash, true, archiveFileIndex); if(!match.empty()) { Console::LoadROM(match, nullptr, archiveFileIndex); @@ -135,7 +135,7 @@ bool Console::LoadROM(string filename, uint32_t crc32Hash) } //Perform slow CRC32 search for ROM - for(string folder : FolderUtilities::GetKnowGameFolders()) { + for(string folder : FolderUtilities::GetKnownGameFolders()) { string match = RomLoader::FindMatchingRomInFolder(folder, filename, crc32Hash, false, archiveFileIndex); if(!match.empty()) { Console::LoadROM(match, nullptr, archiveFileIndex); diff --git a/GUI.NET/Dependencies/resources.en.xml b/GUI.NET/Dependencies/resources.en.xml index df28d094..720784e9 100644 --- a/GUI.NET/Dependencies/resources.en.xml +++ b/GUI.NET/Dependencies/resources.en.xml @@ -20,6 +20,8 @@ {0} roms found + Mesen could not find any games to load. + {0} games and {1} cheats in database {0} cheats imported for {1}. diff --git a/GUI.NET/Dependencies/resources.es.xml b/GUI.NET/Dependencies/resources.es.xml index 47d3a272..ae77aeb5 100644 --- a/GUI.NET/Dependencies/resources.es.xml +++ b/GUI.NET/Dependencies/resources.es.xml @@ -84,6 +84,7 @@ Depurar Ventana de log Captura de pantalla + Load Random Game Ayuda Buscar actualizaciones Enviar un error @@ -476,7 +477,11 @@ {0} y {1} trucos de juegos presentes en la base de datos {0} trucos se importaron para el juego {1}. + {0} roms encontradas + + Mesen could not find any games to load. + Pista siguiente (Espera para jugar más rápido) [sin nombre] [desconocido] diff --git a/GUI.NET/Dependencies/resources.fr.xml b/GUI.NET/Dependencies/resources.fr.xml index a0686a78..1619ea82 100644 --- a/GUI.NET/Dependencies/resources.fr.xml +++ b/GUI.NET/Dependencies/resources.fr.xml @@ -83,6 +83,7 @@ Run all tests Débogueur Fenêtre de log + Ouvrir un jeu aléatoire Capture d'écran Aide Recherche de mises-à-jour @@ -489,6 +490,8 @@ {0} roms trouvés + Mesen n'a pas trouvé de jeu sur votre disque. + {0} jeux et {1} codes présents dans la base de données {0} codes ont été importés pour le jeu {1}. diff --git a/GUI.NET/Dependencies/resources.ja.xml b/GUI.NET/Dependencies/resources.ja.xml index a29b48cc..640fc859 100644 --- a/GUI.NET/Dependencies/resources.ja.xml +++ b/GUI.NET/Dependencies/resources.ja.xml @@ -84,6 +84,7 @@ デバッガ ログウィンドウ スクリーンショットを撮る + ランダムゲームを開く ヘルプ アップデートの確認 バグレポート @@ -471,6 +472,8 @@ {0}個 + Mesenはゲームファイルを見つかりませんでした。 + ゲーム{0}個とチートコード{1}個を見つけました {1}用のチートコード{0}個がインポートされました。. diff --git a/GUI.NET/Dependencies/resources.ru.xml b/GUI.NET/Dependencies/resources.ru.xml index b684876c..3a73eedf 100644 --- a/GUI.NET/Dependencies/resources.ru.xml +++ b/GUI.NET/Dependencies/resources.ru.xml @@ -84,6 +84,7 @@ Отладчик Лог Сделать скриншот + Load Random Game Помощь Проверить обновления Сообщить об ошибке @@ -480,6 +481,8 @@ {0} Найденные ROM файлы + Mesen could not find any games to load. + игр {0}, читов {1} {0} читов импортировано для {1}. diff --git a/GUI.NET/Dependencies/resources.uk.xml b/GUI.NET/Dependencies/resources.uk.xml index 59ff741d..8b7f260e 100644 --- a/GUI.NET/Dependencies/resources.uk.xml +++ b/GUI.NET/Dependencies/resources.uk.xml @@ -84,6 +84,7 @@ Налагодження Лог Зробити скріншот + Load Random Game Допомога Перевірити оновлення Повідомити про помилку @@ -479,6 +480,8 @@ {0} Знайдені ROM файли + Mesen could not find any games to load. + iгр {0}, читiв {1} {0} читiв імпортовано для {1}. diff --git a/GUI.NET/Forms/frmMain.Designer.cs b/GUI.NET/Forms/frmMain.Designer.cs index f08a45d7..260b1c3f 100644 --- a/GUI.NET/Forms/frmMain.Designer.cs +++ b/GUI.NET/Forms/frmMain.Designer.cs @@ -159,6 +159,7 @@ namespace Mesen.GUI.Forms this.mnuDebugger = new System.Windows.Forms.ToolStripMenuItem(); this.mnuLogWindow = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); + this.mnuRandomGame = new System.Windows.Forms.ToolStripMenuItem(); this.mnuTakeScreenshot = new System.Windows.Forms.ToolStripMenuItem(); this.mnuHelp = new System.Windows.Forms.ToolStripMenuItem(); this.mnuCheckForUpdates = new System.Windows.Forms.ToolStripMenuItem(); @@ -258,50 +259,50 @@ namespace Mesen.GUI.Forms this.mnuOpen.Image = global::Mesen.GUI.Properties.Resources.FolderOpen; this.mnuOpen.Name = "mnuOpen"; this.mnuOpen.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.mnuOpen.Size = new System.Drawing.Size(146, 22); + this.mnuOpen.Size = new System.Drawing.Size(152, 22); this.mnuOpen.Text = "Open"; this.mnuOpen.Click += new System.EventHandler(this.mnuOpen_Click); // // toolStripMenuItem4 // this.toolStripMenuItem4.Name = "toolStripMenuItem4"; - this.toolStripMenuItem4.Size = new System.Drawing.Size(143, 6); + this.toolStripMenuItem4.Size = new System.Drawing.Size(149, 6); // // mnuSaveState // this.mnuSaveState.Name = "mnuSaveState"; - this.mnuSaveState.Size = new System.Drawing.Size(146, 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(146, 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(143, 6); + this.toolStripMenuItem7.Size = new System.Drawing.Size(149, 6); // // mnuRecentFiles // this.mnuRecentFiles.Name = "mnuRecentFiles"; - this.mnuRecentFiles.Size = new System.Drawing.Size(146, 22); + this.mnuRecentFiles.Size = new System.Drawing.Size(152, 22); this.mnuRecentFiles.Text = "Recent Files"; // // toolStripMenuItem6 // this.toolStripMenuItem6.Name = "toolStripMenuItem6"; - this.toolStripMenuItem6.Size = new System.Drawing.Size(143, 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(146, 22); + this.mnuExit.Size = new System.Drawing.Size(152, 22); this.mnuExit.Text = "Exit"; this.mnuExit.Click += new System.EventHandler(this.mnuExit_Click); // @@ -448,7 +449,7 @@ namespace Mesen.GUI.Forms this.mnuShowFPS}); this.mnuEmulationSpeed.Image = global::Mesen.GUI.Properties.Resources.Speed; this.mnuEmulationSpeed.Name = "mnuEmulationSpeed"; - this.mnuEmulationSpeed.Size = new System.Drawing.Size(135, 22); + this.mnuEmulationSpeed.Size = new System.Drawing.Size(152, 22); this.mnuEmulationSpeed.Text = "Speed"; this.mnuEmulationSpeed.DropDownOpening += new System.EventHandler(this.mnuEmulationSpeed_DropDownOpening); // @@ -550,7 +551,7 @@ namespace Mesen.GUI.Forms this.mnuFullscreen}); this.mnuVideoScale.Image = global::Mesen.GUI.Properties.Resources.Fullscreen; this.mnuVideoScale.Name = "mnuVideoScale"; - this.mnuVideoScale.Size = new System.Drawing.Size(135, 22); + this.mnuVideoScale.Size = new System.Drawing.Size(152, 22); this.mnuVideoScale.Text = "Video Size"; // // mnuScale1x @@ -658,7 +659,7 @@ namespace Mesen.GUI.Forms this.toolStripMenuItem19, this.mnuBilinearInterpolation}); this.mnuVideoFilter.Name = "mnuVideoFilter"; - this.mnuVideoFilter.Size = new System.Drawing.Size(135, 22); + this.mnuVideoFilter.Size = new System.Drawing.Size(152, 22); this.mnuVideoFilter.Text = "Video Filter"; // // mnuNoneFilter @@ -841,7 +842,7 @@ namespace Mesen.GUI.Forms this.mnuRegionDendy}); this.mnuRegion.Image = global::Mesen.GUI.Properties.Resources.Globe; this.mnuRegion.Name = "mnuRegion"; - this.mnuRegion.Size = new System.Drawing.Size(135, 22); + this.mnuRegion.Size = new System.Drawing.Size(152, 22); this.mnuRegion.Text = "Region"; // // mnuRegionAuto @@ -875,13 +876,13 @@ namespace Mesen.GUI.Forms // toolStripMenuItem10 // this.toolStripMenuItem10.Name = "toolStripMenuItem10"; - this.toolStripMenuItem10.Size = new System.Drawing.Size(132, 6); + this.toolStripMenuItem10.Size = new System.Drawing.Size(149, 6); // // mnuAudioConfig // this.mnuAudioConfig.Image = global::Mesen.GUI.Properties.Resources.Audio; this.mnuAudioConfig.Name = "mnuAudioConfig"; - this.mnuAudioConfig.Size = new System.Drawing.Size(135, 22); + this.mnuAudioConfig.Size = new System.Drawing.Size(152, 22); this.mnuAudioConfig.Text = "Audio"; this.mnuAudioConfig.Click += new System.EventHandler(this.mnuAudioConfig_Click); // @@ -889,7 +890,7 @@ namespace Mesen.GUI.Forms // this.mnuInput.Image = global::Mesen.GUI.Properties.Resources.Controller; this.mnuInput.Name = "mnuInput"; - this.mnuInput.Size = new System.Drawing.Size(135, 22); + this.mnuInput.Size = new System.Drawing.Size(152, 22); this.mnuInput.Text = "Input"; this.mnuInput.Click += new System.EventHandler(this.mnuInput_Click); // @@ -897,7 +898,7 @@ namespace Mesen.GUI.Forms // this.mnuVideoConfig.Image = global::Mesen.GUI.Properties.Resources.Video; this.mnuVideoConfig.Name = "mnuVideoConfig"; - this.mnuVideoConfig.Size = new System.Drawing.Size(135, 22); + this.mnuVideoConfig.Size = new System.Drawing.Size(152, 22); this.mnuVideoConfig.Text = "Video"; this.mnuVideoConfig.Click += new System.EventHandler(this.mnuVideoConfig_Click); // @@ -905,20 +906,20 @@ namespace Mesen.GUI.Forms // this.mnuEmulationConfig.Image = global::Mesen.GUI.Properties.Resources.DipSwitches; this.mnuEmulationConfig.Name = "mnuEmulationConfig"; - this.mnuEmulationConfig.Size = new System.Drawing.Size(135, 22); + this.mnuEmulationConfig.Size = new System.Drawing.Size(152, 22); this.mnuEmulationConfig.Text = "Emulation"; this.mnuEmulationConfig.Click += new System.EventHandler(this.mnuEmulationConfig_Click); // // toolStripMenuItem11 // this.toolStripMenuItem11.Name = "toolStripMenuItem11"; - this.toolStripMenuItem11.Size = new System.Drawing.Size(132, 6); + this.toolStripMenuItem11.Size = new System.Drawing.Size(149, 6); // // mnuPreferences // this.mnuPreferences.Image = global::Mesen.GUI.Properties.Resources.Cog; this.mnuPreferences.Name = "mnuPreferences"; - this.mnuPreferences.Size = new System.Drawing.Size(135, 22); + this.mnuPreferences.Size = new System.Drawing.Size(152, 22); this.mnuPreferences.Text = "Preferences"; this.mnuPreferences.Click += new System.EventHandler(this.mnuPreferences_Click); // @@ -934,6 +935,7 @@ namespace Mesen.GUI.Forms this.mnuDebugger, this.mnuLogWindow, this.toolStripMenuItem1, + this.mnuRandomGame, this.mnuTakeScreenshot}); this.mnuTools.Name = "mnuTools"; this.mnuTools.Size = new System.Drawing.Size(48, 20); @@ -950,7 +952,7 @@ namespace Mesen.GUI.Forms this.mnuProfile}); this.mnuNetPlay.Image = global::Mesen.GUI.Properties.Resources.NetPlay; this.mnuNetPlay.Name = "mnuNetPlay"; - this.mnuNetPlay.Size = new System.Drawing.Size(185, 22); + this.mnuNetPlay.Size = new System.Drawing.Size(231, 22); this.mnuNetPlay.Text = "Net Play"; // // mnuStartServer @@ -1048,7 +1050,7 @@ namespace Mesen.GUI.Forms this.mnuStopMovie}); this.mnuMovies.Image = global::Mesen.GUI.Properties.Resources.Movie; this.mnuMovies.Name = "mnuMovies"; - this.mnuMovies.Size = new System.Drawing.Size(185, 22); + this.mnuMovies.Size = new System.Drawing.Size(231, 22); this.mnuMovies.Text = "Movies"; // // mnuPlayMovie @@ -1098,7 +1100,7 @@ namespace Mesen.GUI.Forms this.mnuWaveStop}); this.mnuSoundRecorder.Image = global::Mesen.GUI.Properties.Resources.Microphone; this.mnuSoundRecorder.Name = "mnuSoundRecorder"; - this.mnuSoundRecorder.Size = new System.Drawing.Size(185, 22); + this.mnuSoundRecorder.Size = new System.Drawing.Size(231, 22); this.mnuSoundRecorder.Text = "Sound Recorder"; // // mnuWaveRecord @@ -1121,14 +1123,14 @@ namespace Mesen.GUI.Forms // this.mnuCheats.Image = global::Mesen.GUI.Properties.Resources.CheatCode; this.mnuCheats.Name = "mnuCheats"; - this.mnuCheats.Size = new System.Drawing.Size(185, 22); + this.mnuCheats.Size = new System.Drawing.Size(231, 22); this.mnuCheats.Text = "Cheats"; this.mnuCheats.Click += new System.EventHandler(this.mnuCheats_Click); // // toolStripMenuItem12 // this.toolStripMenuItem12.Name = "toolStripMenuItem12"; - this.toolStripMenuItem12.Size = new System.Drawing.Size(182, 6); + this.toolStripMenuItem12.Size = new System.Drawing.Size(228, 6); // // mnuTests // @@ -1139,7 +1141,7 @@ namespace Mesen.GUI.Forms this.mnuRunAllTests, this.mnuRunAllGameTests}); this.mnuTests.Name = "mnuTests"; - this.mnuTests.Size = new System.Drawing.Size(185, 22); + this.mnuTests.Size = new System.Drawing.Size(231, 22); this.mnuTests.Text = "Tests"; // // mnuTestRun @@ -1214,7 +1216,7 @@ namespace Mesen.GUI.Forms // mnuDebugger // this.mnuDebugger.Name = "mnuDebugger"; - this.mnuDebugger.Size = new System.Drawing.Size(185, 22); + this.mnuDebugger.Size = new System.Drawing.Size(231, 22); this.mnuDebugger.Text = "Debugger"; this.mnuDebugger.Click += new System.EventHandler(this.mnuDebugger_Click); // @@ -1222,21 +1224,30 @@ namespace Mesen.GUI.Forms // this.mnuLogWindow.Image = global::Mesen.GUI.Properties.Resources.LogWindow; this.mnuLogWindow.Name = "mnuLogWindow"; - this.mnuLogWindow.Size = new System.Drawing.Size(185, 22); + this.mnuLogWindow.Size = new System.Drawing.Size(231, 22); this.mnuLogWindow.Text = "Log Window"; this.mnuLogWindow.Click += new System.EventHandler(this.mnuLogWindow_Click); // // toolStripMenuItem1 // this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(182, 6); + this.toolStripMenuItem1.Size = new System.Drawing.Size(228, 6); + // + // mnuRandomGame + // + this.mnuRandomGame.Image = global::Mesen.GUI.Properties.Resources.Dice; + this.mnuRandomGame.Name = "mnuRandomGame"; + this.mnuRandomGame.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Insert))); + this.mnuRandomGame.Size = new System.Drawing.Size(231, 22); + this.mnuRandomGame.Text = "Load Random Game"; + this.mnuRandomGame.Click += new System.EventHandler(this.mnuRandomGame_Click); // // mnuTakeScreenshot // this.mnuTakeScreenshot.Image = global::Mesen.GUI.Properties.Resources.Camera; this.mnuTakeScreenshot.Name = "mnuTakeScreenshot"; this.mnuTakeScreenshot.ShortcutKeys = System.Windows.Forms.Keys.F12; - this.mnuTakeScreenshot.Size = new System.Drawing.Size(185, 22); + this.mnuTakeScreenshot.Size = new System.Drawing.Size(231, 22); this.mnuTakeScreenshot.Text = "Take Screenshot"; this.mnuTakeScreenshot.Click += new System.EventHandler(this.mnuTakeScreenshot_Click); // @@ -1446,6 +1457,7 @@ namespace Mesen.GUI.Forms private System.Windows.Forms.ToolStripSeparator toolStripMenuItem20; private System.Windows.Forms.ToolStripMenuItem mnuReportBug; private System.Windows.Forms.ToolStripMenuItem mnuRunAllGameTests; + private System.Windows.Forms.ToolStripMenuItem mnuRandomGame; } } diff --git a/GUI.NET/Forms/frmMain.cs b/GUI.NET/Forms/frmMain.cs index 6e8483b1..36b5af22 100644 --- a/GUI.NET/Forms/frmMain.cs +++ b/GUI.NET/Forms/frmMain.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.IO; +using System.Linq; using System.Net; using System.Text; using System.Threading; @@ -207,7 +208,7 @@ namespace Mesen.GUI.Forms { InteropEmu.InitializeEmu(ConfigManager.HomeFolder, this.Handle, this.ctrlRenderer.Handle, _noAudio, _noVideo, _noInput); foreach(RecentItem recentItem in ConfigManager.Config.RecentFiles) { - InteropEmu.AddKnowGameFolder(Path.GetDirectoryName(recentItem.Path).ToLowerInvariant()); + InteropEmu.AddKnownGameFolder(Path.GetDirectoryName(recentItem.Path).ToLowerInvariant()); } ConfigManager.Config.InitializeDefaults(); @@ -1581,5 +1582,25 @@ namespace Mesen.GUI.Forms } } } + + private void mnuRandomGame_Click(object sender, EventArgs e) + { + IEnumerable gameFolders = ConfigManager.Config.RecentFiles.Select(recentFile => Path.GetDirectoryName(recentFile.Path).ToLowerInvariant()).Distinct(); + List gameRoms = new List(); + + foreach(string folder in gameFolders) { + gameRoms.AddRange(Directory.EnumerateFiles(folder, "*.nes", SearchOption.TopDirectoryOnly)); + gameRoms.AddRange(Directory.EnumerateFiles(folder, "*.unf", SearchOption.TopDirectoryOnly)); + gameRoms.AddRange(Directory.EnumerateFiles(folder, "*.fds", SearchOption.TopDirectoryOnly)); + } + + if(gameRoms.Count == 0) { + MesenMsgBox.Show("RandomGameNoGameFound", MessageBoxButtons.OK, MessageBoxIcon.Information); + } else { + Random random = new Random(); + string randomGame = gameRoms[random.Next(gameRoms.Count - 1)]; + LoadFile(randomGame); + } + } } } diff --git a/GUI.NET/GUI.NET.csproj b/GUI.NET/GUI.NET.csproj index f10b994a..27a2f3ff 100644 --- a/GUI.NET/GUI.NET.csproj +++ b/GUI.NET/GUI.NET.csproj @@ -875,6 +875,7 @@ Always + diff --git a/GUI.NET/InteropEmu.cs b/GUI.NET/InteropEmu.cs index ab3184a9..7db39e9c 100644 --- a/GUI.NET/InteropEmu.cs +++ b/GUI.NET/InteropEmu.cs @@ -27,7 +27,7 @@ namespace Mesen.GUI [DllImport(DLLPath)] [return: MarshalAs(UnmanagedType.I1)] public static extern bool IsRunning(); [DllImport(DLLPath)] public static extern void LoadROM([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string filename, Int32 archiveFileIndex, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string ipsFile); - [DllImport(DLLPath)] public static extern void AddKnowGameFolder([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string folder); + [DllImport(DLLPath)] public static extern void AddKnownGameFolder([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string folder); [DllImport(DLLPath, EntryPoint = "GetArchiveRomList")] private static extern IntPtr GetArchiveRomListWrapper([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string filename); public static List GetArchiveRomList(string filename) { return new List(PtrToStringUtf8(InteropEmu.GetArchiveRomListWrapper(filename)).Split(new string[] { "[!|!]" }, StringSplitOptions.RemoveEmptyEntries)); } diff --git a/GUI.NET/Properties/Resources.Designer.cs b/GUI.NET/Properties/Resources.Designer.cs index b8fb7df5..2b0f3499 100644 --- a/GUI.NET/Properties/Resources.Designer.cs +++ b/GUI.NET/Properties/Resources.Designer.cs @@ -150,6 +150,16 @@ namespace Mesen.GUI.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Dice { + get { + object obj = ResourceManager.GetObject("Dice", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/GUI.NET/Properties/Resources.resx b/GUI.NET/Properties/Resources.resx index 4e51c4d8..a57f345f 100644 --- a/GUI.NET/Properties/Resources.resx +++ b/GUI.NET/Properties/Resources.resx @@ -238,4 +238,7 @@ ..\Resources\Warning.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Dice.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/GUI.NET/Resources/Dice.png b/GUI.NET/Resources/Dice.png new file mode 100644 index 0000000000000000000000000000000000000000..c958bd9ba0f4b7b81a1d0ae6f7dfdb226651cc36 GIT binary patch literal 1034 zcmV+l1oiugP)?bz7=HZt!5}Ow%<%N-QzlkcRvmtR{s>c3(?D5SS*4jXXCAt6;esy% z1H%tSMn(n@0MP&e!~$ac`}dFG_wU~fKY#v|1kz~+1_pi>78Y6>8k!tGe|~3BQc_{i z(a~|q$;ml%@!~}%prv16h5!T*1IPuQo}MWQ2?@t1O`7!WWGE0)_=p(L|tu-x(?@iWoRJIDrN;GH|eS0NKn83JTH;Il1YA!oni800G1T2?>UO zY;0`IZ{ECNc=qfWgMfelgP@=&!}sq$z^(yG0hRn@_|N#A;mWn!45H#f4BviyW%&E& zF9$#Xu|NazABYAT!tnO(TLxBE7KWUhbg0>17`}Xa#lX(V%y9nv9fst@GKSuXwG5mb z+zh|}{Q3kCKwvL0F);#Nz|Jsp<~)W=mo9^C{`Ko6!;2S}7!s4R7%pD8!obSR$-v3U z$6B zSh!#^10NqBgSfajPy-7?SWr5{<1t5UH2JGCq(|zjHsZYLs{mQ_? z!Uk~xGZWAoe;H=Zp3Cs}-!FzKlNuS=f&NxiS7T6CRsja~3!njiz5)agIFz}8rU8LQ zR8-W<>({S=6VCUaPyQb{w)4Nance?WXZHR7`RDEbn|Ch#-?Dwv|D3#>KS1x^0qU^> z2q3Tlyu7^75NFUyNlATo|NevjfBwGy|MBy^|99?Q_<#85p8qwq)&I=RE#C0(@NNXE z3kPBzkOqJNf*SxzKrAdQAlF#s7vz7ueC722*>k4;4-5+UDkds^9H_Pch-Dej06+kt z7y!(|3_?Oez?7z7B_%Dhmz9-mI#7)v5VJ7g0003704q FolderUtilities::GetKnowGameFolders() +vector FolderUtilities::GetKnownGameFolders() { return _gameFolders; } diff --git a/Utilities/FolderUtilities.h b/Utilities/FolderUtilities.h index 1e649ad3..ba9a0095 100644 --- a/Utilities/FolderUtilities.h +++ b/Utilities/FolderUtilities.h @@ -12,8 +12,8 @@ public: static void SetHomeFolder(string homeFolder); static string GetHomeFolder(); - static void AddKnowGameFolder(string gameFolder); - static vector GetKnowGameFolders(); + static void AddKnownGameFolder(string gameFolder); + static vector GetKnownGameFolders(); static string GetSaveFolder(); static string GetSaveStateFolder();