Localization: Mesen is now available in English, French and Japanese

This commit is contained in:
Souryo 2016-02-19 13:05:04 -05:00
parent 71bf0527d9
commit 0c765aca59
61 changed files with 1771 additions and 440 deletions

View File

@ -289,5 +289,5 @@ void AutoRomTest::Save()
}
MessageManager::DisplayMessage("Test", "Test file saved to: " + FolderUtilities::GetFilename(_filename, true));
MessageManager::DisplayMessage("Test", "TestFileSavedTo", FolderUtilities::GetFilename(_filename, true));
}

View File

@ -155,7 +155,7 @@ void BaseMapper::SelectPRGPage(uint16_t slot, uint16_t page, PrgMemoryType memor
//i.e same logic as NROM (mapper 0) when PRG is 16kb
//Needed by "Pyramid" (mapper 79)
#ifdef _DEBUG
MessageManager::DisplayMessage("Debug", "PRG size is smaller than 32kb");
MessageManager::DisplayMessage("Debug", "PrgSizeWarning");
#endif
for(slot = 0; slot < PrgAddressRangeSize / _prgSize; slot++) {

View File

@ -84,6 +84,6 @@ void BaseVideoFilter::TakeScreenshot(string romFilename)
PNGHelper::WritePNG(ssFilename, (uint8_t*)frameBuffer, GetFrameInfo().Width, GetFrameInfo().Height);
delete[] frameBuffer;
MessageManager::DisplayMessage("Screenshot saved", FolderUtilities::GetFilename(ssFilename, true));
MessageManager::DisplayMessage("ScreenshotSaved", FolderUtilities::GetFilename(ssFilename, true));
}

View File

@ -188,7 +188,7 @@ void CheatManager::SetCheats(vector<CodeInfo> &cheats)
Instance->ClearCodes();
if(cheats.size() > 0) {
MessageManager::DisplayMessage("Cheats", std::to_string(cheats.size()) + " cheats applied.");
MessageManager::DisplayMessage("Cheats", cheats.size() > 1 ? "CheatsApplied" : "CheatApplied", std::to_string(cheats.size()));
for(CodeInfo &cheat : cheats) {
Instance->AddCode(cheat);
}

View File

@ -69,9 +69,9 @@ void Console::Initialize(string romFilename, stringstream *filestream, string ip
VideoDecoder::GetInstance()->StartThread();
FolderUtilities::AddKnowGameFolder(FolderUtilities::GetFolderName(romFilename));
MessageManager::DisplayMessage("Game loaded", FolderUtilities::GetFilename(romFilename, false));
MessageManager::DisplayMessage("GameLoaded", FolderUtilities::GetFilename(romFilename, false));
} else {
MessageManager::DisplayMessage("Error", string("Could not load file: ") + FolderUtilities::GetFilename(romFilename, true));
MessageManager::DisplayMessage("Error", "CouldNotLoadFile", FolderUtilities::GetFilename(romFilename, true));
}
}
@ -218,7 +218,7 @@ void Console::Run()
try {
_cpu->Exec();
} catch(const std::runtime_error &ex) {
MessageManager::DisplayMessage("Error", string("Game has crashed. (") + ex.what() + ")");
MessageManager::DisplayMessage("Error", "GameCrash", ex.what());
break;
}

View File

@ -22,6 +22,8 @@ uint16_t EmulationSettings::_versionMajor = 0;
uint8_t EmulationSettings::_versionMinor = 1;
uint8_t EmulationSettings::_versionRevision = 1;
Language EmulationSettings::_displayLanguage = Language::English;
uint32_t EmulationSettings::_flags = 0;
uint32_t EmulationSettings::_audioLatency = 20000;

View File

@ -142,6 +142,14 @@ struct KeyMappingSet
uint32_t TurboSpeed;
};
enum class Language
{
SystemDefault = 0,
English = 1,
French = 2,
Japanese = 3
};
class EmulationSettings
{
private:
@ -152,6 +160,8 @@ private:
static uint32_t PpuPaletteArgb[64];
static uint32_t _flags;
static Language _displayLanguage;
static uint32_t _audioLatency;
static double _channelVolume[11];
static double _masterVolume;
@ -199,6 +209,16 @@ public:
return (_flags & flag) == flag;
}
static void SetDisplayLanguage(Language lang)
{
_displayLanguage = lang;
}
static Language GetDisplayLanguage()
{
return _displayLanguage;
}
static bool IsPaused()
{
return CheckFlag(EmulationFlags::Paused) || (CheckFlag(EmulationFlags::InBackground) && CheckFlag(EmulationFlags::PauseWhenInBackground) && !GameClient::Connected());

View File

@ -52,7 +52,7 @@ void GameClient::PrivateConnect(shared_ptr<ClientConnectionData> connectionData)
_connection.reset(new GameClientConnection(_socket, connectionData));
_connected = true;
} else {
MessageManager::DisplayMessage("Net Play", "Could not connect to server.");
MessageManager::DisplayMessage("NetPlay", "CouldNotConnect");
_connected = false;
_socket.reset();
}

View File

@ -17,7 +17,7 @@
GameClientConnection::GameClientConnection(shared_ptr<Socket> socket, shared_ptr<ClientConnectionData> connectionData) : GameConnection(socket, connectionData)
{
MessageManager::RegisterNotificationListener(this);
MessageManager::DisplayMessage("Net Play", "Connected to server.");
MessageManager::DisplayMessage("NetPlay", "ConnectedToServer");
SendHandshake();
}
@ -27,7 +27,7 @@ GameClientConnection::~GameClientConnection()
DisableControllers();
MessageManager::SendNotification(ConsoleNotificationType::DisconnectedFromServer);
MessageManager::DisplayMessage("Net Play", "Connection to server lost.");
MessageManager::DisplayMessage("NetPlay", "ConnectionLost");
MessageManager::UnregisterNotificationListener(this);
}
@ -82,7 +82,7 @@ void GameClientConnection::ProcessMessage(NetMessage* message)
break;
case MessageType::ForceDisconnect:
MessageManager::DisplayMessage("Net Play", ((ForceDisconnectMessage*)message)->GetMessage());
MessageManager::DisplayMessage("NetPlay", ((ForceDisconnectMessage*)message)->GetMessage());
break;
case MessageType::PlayerList:
@ -97,9 +97,9 @@ void GameClientConnection::ProcessMessage(NetMessage* message)
_controllerPort = gameInfo->GetPort();
if(_controllerPort == GameConnection::SpectatorPort) {
MessageManager::DisplayMessage("Net Play", "Connected as spectator");
MessageManager::DisplayMessage("NetPlay", "ConnectedAsSpectator");
} else {
MessageManager::DisplayMessage("Net Play", string("Connected as player ") + std::to_string(_controllerPort + 1));
MessageManager::DisplayMessage("NetPlay", "ConnectedAsPlayer", std::to_string(_controllerPort + 1));
}
}

View File

@ -42,7 +42,7 @@ public:
if(Console::LoadROM(filename, _crc32Hash)) {
return true;
} else {
MessageManager::DisplayMessage("Net Play", "Could not find matching game ROM.");
MessageManager::DisplayMessage("NetPlay", "CouldNotFindRom");
return false;
}
}

View File

@ -73,7 +73,7 @@ void GameServer::Exec()
_listener->Listen(10);
_stop = false;
_initialized = true;
MessageManager::DisplayMessage("Net Play" , "Server started (Port: " + std::to_string(_port) + ")");
MessageManager::DisplayMessage("NetPlay" , "ServerStarted", std::to_string(_port));
while(!_stop) {
AcceptConnections();
@ -87,7 +87,7 @@ void GameServer::Stop()
{
_initialized = false;
_listener.reset();
MessageManager::DisplayMessage("Net Play", "Server stopped");
MessageManager::DisplayMessage("NetPlay", "ServerStopped");
}
void GameServer::StartServer(uint16_t port, string hostPlayerName)

View File

@ -104,7 +104,7 @@ void GameServerConnection::ProcessHandshakeResponse(HandShakeMessage* message)
Console::Resume();
} else {
SendForceDisconnectMessage("Server is using a different version of Mesen (" + EmulationSettings::GetMesenVersionString() + ") - you have been disconnected.");
MessageManager::DisplayMessage("Net Play", message->GetPlayerName() + " is not running the same version of Mesen and has been disconnected");
MessageManager::DisplayMessage("NetPlay", + "NetplayVersionMismatch", message->GetPlayerName());
}
}

View File

@ -91,7 +91,7 @@
BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
{
#ifdef _DEBUG
MessageManager::DisplayMessage("Game Info", "Mapper: " + std::to_string(romData.MapperID));
MessageManager::DisplayMessage("GameInfo", "Mapper", std::to_string(romData.MapperID));
#endif
switch(romData.MapperID) {
@ -201,7 +201,7 @@ BaseMapper* MapperFactory::GetMapperFromID(RomData &romData)
case MapperFactory::FdsMapperID: return new FDS();
}
MessageManager::DisplayMessage("Error", "Unsupported mapper, cannot load game.");
MessageManager::DisplayMessage("Error", "UnsupportedMapper");
return nullptr;
}

View File

@ -1,7 +1,155 @@
#include "stdafx.h"
#include "stdafx.h"
#include <algorithm>
#include "MessageManager.h"
#include "EmulationSettings.h"
std::unordered_map<string, string> MessageManager::_enResources = {
{ "Cheats", u8"Cheats" },
{ "Debug", u8"Debug" },
{ "EmulationSpeed", u8"Emulation Speed" },
{ "Error", u8"Error" },
{ "GameInfo", u8"Game Info" },
{ "GameLoaded", u8"Game loaded" },
{ "Movies", u8"Movies" },
{ "NetPlay", u8"Net Play" },
{ "SaveStates", u8"Save States" },
{ "ScreenshotSaved", u8"Screenshot Saved" },
{ "Test", u8"Test" },
{ "CheatApplied", u8"1 cheat applied." },
{ "CheatsApplied", u8"%1 cheats applied." },
{ "ConnectedToServer", u8"Connected to server." },
{ "ConnectedAsPlayer", u8"Connected as player %1" },
{ "ConnectedAsSpectator", u8"Connected as spectator." },
{ "ConnectionLost", u8"Connection to server lost." },
{ "CouldNotConnect", u8"Could not connect to the server." },
{ "CouldNotIniitalizeAudioSystem", u8"Could not initialize audio system" },
{ "CouldNotFindRom", u8"Could not find matching game ROM." },
{ "CouldNotLoadFile", u8"Could not load file: %1" },
{ "EmulationMaximumSpeed", u8"Maximum speed" },
{ "EmulationSpeedPercent", u8"%1%" },
{ "GameCrash", u8"Game has crashed (%1)" },
{ "Mapper", u8"Mapper: %1" },
{ "MovieEnded", u8"Movie ended." },
{ "MovieInvalid", u8"Invalid movie file." },
{ "MovieMissingRom", u8"Missing ROM required (%1) to play movie." },
{ "MovieNewerVersion", u8"Cannot load movies created by a more recent version of Mesen. Please download the latest version." },
{ "MovieIncompatibleVersion", u8"This movie is incompatible with this version of Mesen." },
{ "MoviePlaying", u8"Playing movie: %1" },
{ "MovieRecordingTo", u8"Recording to: %1" },
{ "MovieSaved", u8"Movie saved to file: %1" },
{ "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." },
{ "SaveStateInvalidFile", u8"Invalid save state file." },
{ "SaveStateLoaded", u8"State #%1 loaded." },
{ "SaveStateNewerVersion", u8"Cannot load save states created by a more recent version of Mesen. Please download the latest version." },
{ "SaveStateSaved", u8"State #%1 saved." },
{ "ServerStarted", u8"Server started (Port: %1)" },
{ "ServerStopped", u8"Server stopped" },
{ "TestFileSavedTo", u8"Test file saved to: %1" },
{ "UnsupportedMapper", u8"Unsupported mapper, cannot load game." },
};
std::unordered_map<string, string> MessageManager::_frResources = {
{ "Cheats", u8"Codes" },
{ "Debug", u8"Debug" },
{ "EmulationSpeed", u8"Vitesse" },
{ "Error", u8"Erreur" },
{ "GameInfo", u8"Info sur le ROM" },
{ "GameLoaded", u8"Jeu chargé" },
{ "Movies", u8"Films" },
{ "NetPlay", u8"Jeu en ligne" },
{ "SaveStates", u8"Sauvegardes" },
{ "ScreenshotSaved", u8"Capture d'écran" },
{ "Test", u8"Test" },
{ "CheatApplied", u8"%1 code activé." },
{ "CheatsApplied", u8"%1 codes activés." },
{ "ConnectedToServer", u8"Connecté avec succès au serveur." },
{ "ConnectedAsPlayer", u8"Connecté en tant que joueur #%1" },
{ "ConnectedAsSpectator", u8"Connecté en tant que spectateur." },
{ "ConnectionLost", u8"La connexion avec le serveur a été perdue." },
{ "CouldNotConnect", u8"Impossible de se connecter au serveur." },
{ "CouldNotIniitalizeAudioSystem", u8"L'initialisation du système de son à échoué" },
{ "CouldNotFindRom", u8"Impossible de trouvé un rom correspondant." },
{ "CouldNotLoadFile", u8"Impossible de charger le fichier : %1" },
{ "EmulationMaximumSpeed", u8"Vitesse maximale" },
{ "EmulationSpeedPercent", u8"%1%" },
{ "GameCrash", u8"Le jeu a planté (%1)" },
{ "Mapper", u8"Mapper : %1" },
{ "MovieEnded", u8"Fin du film." },
{ "MovieInvalid", u8"Fichier de film invalide." },
{ "MovieMissingRom", u8"Le rom (%1) correspondant au film sélectionné est introuvable." },
{ "MovieNewerVersion", u8"Impossible de charger un film qui a été créé avec une version plus récente de Mesen. Veuillez mettre à jour Mesen pour jouer ce film." },
{ "MovieIncompatibleVersion", u8"Ce film est incompatible avec votre version de Mesen." },
{ "MoviePlaying", u8"Film démarré: %1" },
{ "MovieRecordingTo", u8"En cours d'enregistrement : %1" },
{ "MovieSaved", u8"Film sauvegardé : %1" },
{ "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." },
{ "SaveStateInvalidFile", u8"Fichier de sauvegarde invalide ou corrompu." },
{ "SaveStateLoaded", u8"Sauvegarde #%1 chargée." },
{ "SaveStateNewerVersion", u8"Impossible de charger une sauvegarde qui a été créée avec une version plus récente de Mesen. Veuillez mettre à jour Mesen." },
{ "SaveStateSaved", u8"Sauvegarde #%1 sauvegardée." },
{ "ServerStarted", u8"Le serveur a été démarré (Port: %1)" },
{ "ServerStopped", u8"Le serveur a été arrêté" },
{ "TestFileSavedTo", u8"Test sauvegardé: %1" },
{ "UnsupportedMapper", u8"Ce mapper n'est pas encore supporté - le jeu ne peut pas être démarré." },
};
std::unordered_map<string, string> MessageManager::_jaResources = {
{ "Cheats", u8"チート" },
{ "Debug", u8"Debug" },
{ "EmulationSpeed", u8"速度" },
{ "Error", u8"エラー" },
{ "GameInfo", u8"ゲーム情報" },
{ "GameLoaded", u8"ゲーム開始" },
{ "Movies", u8"動画" },
{ "NetPlay", u8"ネットプレー" },
{ "SaveStates", u8"クイックセーブ" },
{ "ScreenshotSaved", u8"スクリーンショット" },
{ "Test", u8"テスト" },
{ "CheatApplied", u8"チートコード%1個を有効にしました。" },
{ "CheatsApplied", u8"チートコード%1個を有効にしました。" },
{ "ConnectedToServer", u8"サーバに接続しました。" },
{ "ConnectedAsPlayer", u8"プレーヤー %1として接続しました。" },
{ "ConnectedAsSpectator", u8"観客として接続しました。" },
{ "ConnectionLost", u8"セーバから切断されました。" },
{ "CouldNotConnect", u8"セーバに接続出来ませんでした。" },
{ "CouldNotIniitalizeAudioSystem", u8"オーディオデバイスを初期化出来ませんでした。" },
{ "CouldNotFindRom", u8"該当するゲームファイルは見つけられませんでした。" },
{ "CouldNotLoadFile", u8"ファイルをロードできませんでした: %1" },
{ "EmulationMaximumSpeed", u8"最高速度" },
{ "EmulationSpeedPercent", u8"%1%" },
{ "GameCrash", u8"ゲームはクラッシュしました (%1)" },
{ "Mapper", u8"Mapper: %1" },
{ "MovieEnded", u8"動画が終わりました。" },
{ "MovieInvalid", u8"動画のデータは読めませんでした。" },
{ "MovieMissingRom", u8"動画に必要なゲームファイルは見つけられませんでした。(%1)" },
{ "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のバージョンで作られたもので、ロードできませんでした。" },
{ "SaveStateInvalidFile", u8"クイックセーブデータは読めませんでした。" },
{ "SaveStateLoaded", u8"クイックセーブ%1をロードしました。" },
{ "SaveStateNewerVersion", u8"クイックセーブデータはもっと新しいMesenのバージョンで作られたため、読めませんでした。 Mesenのサイトで最新のバージョンをダウンロードしてください。" },
{ "SaveStateSaved", u8"クイックセーブ%1をセーブしました。" },
{ "ServerStarted", u8"サーバは起動しました (ポート: %1)" },
{ "ServerStopped", u8"セーバは停止しました。" },
{ "TestFileSavedTo", u8"Test file saved to: %1" },
{ "UnsupportedMapper", u8"このMapperを使うゲームはロードできません。" },
};
IMessageManager* MessageManager::_messageManager = nullptr;
vector<INotificationListener*> MessageManager::_notificationListeners;
@ -11,9 +159,45 @@ void MessageManager::RegisterMessageManager(IMessageManager* messageManager)
MessageManager::_messageManager = messageManager;
}
void MessageManager::DisplayMessage(string title, string message)
string MessageManager::Localize(string key)
{
std::unordered_map<string, string> *resources = nullptr;
switch(EmulationSettings::GetDisplayLanguage()) {
case Language::English: resources = &_enResources; break;
case Language::French: resources = &_frResources; break;
case Language::Japanese: resources = &_jaResources; break;
}
if(resources) {
if(resources->find(key) != resources->end()) {
return (*resources)[key];
}
}
return "";
}
void MessageManager::DisplayMessage(string title, string message, string param1)
{
if(MessageManager::_messageManager) {
std::unordered_map<string, string> *resources = nullptr;
switch(EmulationSettings::GetDisplayLanguage()) {
case Language::English: resources = &_enResources; break;
case Language::French: resources = &_frResources; break;
case Language::Japanese: resources = &_jaResources; break;
}
if(resources) {
if(resources->find(title) != resources->end()) {
title = (*resources)[title];
}
if(resources->find(message) != resources->end()) {
message = (*resources)[message];
size_t startPos = message.find(u8"%1");
if(startPos != std::string::npos) {
message.replace(startPos, 2, param1);
}
}
}
MessageManager::_messageManager->DisplayMessage(title, message);
}
}

View File

@ -4,16 +4,22 @@
#include "IMessageManager.h"
#include "INotificationListener.h"
#include <unordered_map>
class MessageManager
{
private:
static IMessageManager* _messageManager;
static vector<INotificationListener*> _notificationListeners;
static std::unordered_map<string, string> _enResources;
static std::unordered_map<string, string> _frResources;
static std::unordered_map<string, string> _jaResources;
public:
static string Localize(string key);
static void RegisterMessageManager(IMessageManager* messageManager);
static void DisplayMessage(string title, string message = "");
static void DisplayMessage(string title, string message, string param1 = "");
static void DisplayToast(string title, string message, uint8_t* iconData, uint32_t iconSize);
static void RegisterNotificationListener(INotificationListener* notificationListener);

View File

@ -58,7 +58,7 @@ uint8_t Movie::GetState(uint8_t port)
if(_readPosition[port] >= _data.DataSize[port]) {
//End of movie file
MessageManager::DisplayMessage("Movies", "Movie ended.");
MessageManager::DisplayMessage("Movies", "MovieEnded");
MessageManager::SendNotification(ConsoleNotificationType::MovieEnded);
if(EmulationSettings::CheckFlag(EmulationFlags::PauseOnMovieEnd)) {
EmulationSettings::SetFlags(EmulationFlags::Paused);
@ -104,7 +104,7 @@ void Movie::StartRecording(string filename, bool reset)
Console::Resume();
MessageManager::DisplayMessage("Movies", "Recording to: " + FolderUtilities::GetFilename(filename, true));
MessageManager::DisplayMessage("Movies", "MovieRecordingTo", FolderUtilities::GetFilename(filename, true));
}
}
@ -118,7 +118,7 @@ void Movie::StopAll()
Save();
}
if(_playing) {
MessageManager::DisplayMessage("Movies", "Movie stopped.");
MessageManager::DisplayMessage("Movies", "MovieStopped");
_playing = false;
}
}
@ -140,7 +140,7 @@ void Movie::PlayMovie(stringstream &filestream, bool autoLoadRom, string filenam
_playing = true;
if(!filename.empty()) {
MessageManager::DisplayMessage("Movies", "Playing movie: " + FolderUtilities::GetFilename(filename, true));
MessageManager::DisplayMessage("Movies", "MoviePlaying", FolderUtilities::GetFilename(filename, true));
}
}
Console::Resume();
@ -278,7 +278,7 @@ bool Movie::Save()
_file.close();
MessageManager::DisplayMessage("Movies", "Movie saved to file: " + FolderUtilities::GetFilename(_filename, true));
MessageManager::DisplayMessage("Movies", "MovieSaved", FolderUtilities::GetFilename(_filename, true));
return true;
}
@ -290,20 +290,20 @@ bool Movie::Load(std::stringstream &file, bool autoLoadRom)
if(memcmp(header.Header, "MMO", 3) != 0) {
//Invalid movie file
MessageManager::DisplayMessage("Movies", "Invalid movie file.");
MessageManager::DisplayMessage("Movies", "MovieInvalid");
return false;
}
file.read((char*)&header.MesenVersion, sizeof(header.MesenVersion));
if(header.MesenVersion > EmulationSettings::GetMesenVersion()) {
MessageManager::DisplayMessage("Movies", "Cannot load movies created by a more recent version of Mesen. Please download the latest version.");
MessageManager::DisplayMessage("Movies", "MovieNewerVersion");
return false;
}
file.read((char*)&header.MovieFormatVersion, sizeof(header.MovieFormatVersion));
if(header.MovieFormatVersion != Movie::MovieFormatVersion) {
MessageManager::DisplayMessage("Movies", "This movie is incompatible with this version of Mesen.");
MessageManager::DisplayMessage("Movies", "MovieIncompatibleVersion");
return false;
}
@ -340,7 +340,7 @@ bool Movie::Load(std::stringstream &file, bool autoLoadRom)
if(_data.SaveStateSize > 0) {
if(header.SaveStateFormatVersion != SaveStateManager::FileFormatVersion) {
MessageManager::DisplayMessage("Movies", "This movie is incompatible with this version of Mesen.");
MessageManager::DisplayMessage("Movies", "MovieIncompatibleVersion");
return false;
}
}
@ -373,7 +373,7 @@ bool Movie::Load(std::stringstream &file, bool autoLoadRom)
delete[] readBuffer;
}
} else {
MessageManager::DisplayMessage("Movies", "Missing ROM required (" + string(romFilename) + ") to play movie.");
MessageManager::DisplayMessage("Movies", "MovieMissingRom", romFilename);
}
return loadedGame;
}

View File

@ -41,7 +41,7 @@ void SaveStateManager::SaveState(int stateIndex)
Console::SaveState(file);
Console::Resume();
file.close();
MessageManager::DisplayMessage("Save States", "State #" + std::to_string(stateIndex) + " saved.");
MessageManager::DisplayMessage("SaveStates", "SaveStateSaved" , std::to_string(stateIndex));
}
}
@ -59,13 +59,13 @@ bool SaveStateManager::LoadState(int stateIndex)
file.read((char*)&emuVersion, sizeof(emuVersion));
if(emuVersion > EmulationSettings::GetMesenVersion()) {
MessageManager::DisplayMessage("Save States", "Cannot load save states created by a more recent version of Mesen. Please download the latest version.");
MessageManager::DisplayMessage("Save States", "SaveStateNewerVersion");
return false;
}
file.read((char*)&fileFormatVersion, sizeof(fileFormatVersion));
if(fileFormatVersion != SaveStateManager::FileFormatVersion) {
MessageManager::DisplayMessage("Save States", "State #" + std::to_string(stateIndex) + " is incompatible with this version of Mesen.");
MessageManager::DisplayMessage("Save States", "SaveStateIncompatibleVersion", std::to_string(stateIndex));
return false;
}
@ -73,16 +73,16 @@ bool SaveStateManager::LoadState(int stateIndex)
Console::LoadState(file);
Console::Resume();
MessageManager::DisplayMessage("Save States", "State #" + std::to_string(stateIndex) + " loaded.");
MessageManager::DisplayMessage("Save States", "SaveStateLoaded", std::to_string(stateIndex));
result = true;
} else {
MessageManager::DisplayMessage("Save States", "Invalid save state file.");
MessageManager::DisplayMessage("Save States", "SaveStateInvalidFile");
}
file.close();
}
if(!result) {
MessageManager::DisplayMessage("Save States", "Slot is empty.");
MessageManager::DisplayMessage("Save States", "SaveStateEmpty");
}
return result;

View File

@ -77,10 +77,8 @@ namespace Mesen.GUI.Config
}
}
if(cheatCount == 1) {
InteropEmu.DisplayMessage("Cheats", "1 cheat applied.");
} else if(cheatCount > 1) {
InteropEmu.DisplayMessage("Cheats", cheatCount.ToString() + " cheats applied.");
if(cheatCount > 0) {
InteropEmu.DisplayMessage("Cheats", cheatCount > 1 ? "CheatsApplied" : "CheatApplied", cheatCount.ToString());
}
}
}

View File

@ -20,7 +20,7 @@ namespace Mesen.GUI.Config
{
//SetAvatar(Properties.Resources.MesenLogo);
}
/*
public void SetAvatar(Image image)
{
@ -35,6 +35,6 @@ namespace Mesen.GUI.Config
public Image GetAvatarImage()
{
return Image.FromStream(new MemoryStream(PlayerAvatar));
}
}*/
}
}

View File

@ -7,12 +7,15 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Mesen.GUI.Forms;
using Microsoft.Win32;
namespace Mesen.GUI.Config
{
public class PreferenceInfo
{
public Language DisplayLanguage = Language.SystemDefault;
public bool SingleInstance = true;
public bool PauseWhenInBackground = false;
public bool AllowBackgroundInput = false;

View File

@ -29,7 +29,7 @@ namespace Mesen.GUI.Controls
set { trackBar.Maximum = value; }
}
public string Caption
public override string Text
{
get { return lblText.Text; }
set { lblText.Text = value; }

View File

@ -0,0 +1,92 @@
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resources>
<Messages>
<Message ID="FilterAll">All Files (*.*)|*.*</Message>
<Message ID="FilterMovie">Movie files (*.mmo)|*.mmo|All Files (*.*)|*.*</Message>
<Message ID="FilterPalette">Palette Files (*.pal)|*.pal|All Files (*.*)|*.*</Message>
<Message ID="FilterRom">All supported formats (*.nes, *.zip, *.fds)|*.NES;*.ZIP;*.FDS|NES Roms (*.nes)|*.NES|Famicom Disk System Roms (*.fds)|*.FDS|ZIP Archives (*.zip)|*.ZIP|All (*.*)|*.*</Message>
<Message ID="FilterRomIps">All supported formats (*.nes, *.zip, *.fds, *.ips)|*.NES;*.ZIP;*.IPS;*.FDS|NES Roms (*.nes)|*.NES|Famicom Disk System Roms (*.fds)|*.FDS|ZIP Archives (*.zip)|*.ZIP|IPS Patches (*.ips)|*.IPS|All (*.*)|*.*</Message>
<Message ID="FilterTest">Test files (*.mtp)|*.mtp|All (*.*)|*.*</Message>
<Message ID="Resume">Resume</Message>
<Message ID="Pause">Pause</Message>
<Message ID="StartServer">Start Server</Message>
<Message ID="StopServer">Stop Server</Message>
<Message ID="ConnectToServer">Connect to Server</Message>
<Message ID="Disconnect">Disconnect</Message>
<Message ID="PlayerNumber">Player {0}</Message>
<Message ID="CouldNotInstallRuntime">The Visual Studio Runtime could not be installed properly.</Message>
<Message ID="EmptyState">&lt;empty&gt;</Message>
<Message ID="ErrorWhileCheckingUpdates">An error has occurred while trying to check for updates.&#xA;&#xA;Error details:&#xA;{0}</Message>
<Message ID="FdsBiosNotFound">FDS bios not found. The bios is required to run FDS games.&#xA;&#xA;Select bios file now?</Message>
<Message ID="FdsDiskSide">Disk {0} Side {1}</Message>
<Message ID="FileNotFound">File not found: {0}</Message>
<Message ID="InvalidFdsBios">The selected bios file is invalid.</Message>
<Message ID="HDNesTooltip">This option allows Mesen to load HDNes-format HD packs if they are found.&#xA;&#xA;HD Packs should be placed in the "HdPacks" folder in a subfolder matching the name of the ROM.&#xA;e.g: MyRom.nes should have their HD Pack in "HdPacks\MyRom\hires.txt".&#xA;&#xA;Note: Support for HD Packs is a work in progress and some limitations remain.</Message>
<Message ID="MesenUpToDate">You are running the latest version of Mesen</Message>
<Message ID="PatchAndReset">Patch and reset the current game?</Message>
<Message ID="SelectRomIps">Please select a ROM matching the IPS patch file.</Message>
<Message ID="UnableToDownload">Unable to download file. Check your internet connection and try again.&#xA;&#xA;Details:</Message>
<Message ID="UnableToStartMissingDependencies">Mesen must download and install the Microsoft Visual Studio 2015 runtime to continue. Would you like to automatically download the runtime from Microsoft's website and install it now?"</Message>
<Message ID="UnableToStartMissingFiles">Mesen was unable to start due to missing files.&#xA;&#xA;Error: WinMesen.dll is missing.</Message>
<Message ID="UnexpectedError">An unexpected error has occurred.&#xA;&#xA;Error details:&#xA;{0}</Message>
<Message ID="UpdateDownloadFailed">Download failed - the file appears to be corrupted. Please visit the Mesen website to download the latest version manually.</Message>
<Message ID="UpgradeSuccess">Upgrade completed successfully.</Message>
</Messages>
<Enums>
<Enum ID="ControllerType">
<Value ID="None">None</Value>
<Value ID="StandardController">Standard Controller</Value>
<Value ID="Zapper">Zapper</Value>
<Value ID="ArkanoidController">Arkanoid Controller</Value>
</Enum>
<Enum ID="VideoAspectRatio">
<Value ID="Auto">Auto</Value>
<Value ID="NTSC">NTSC (8:7)</Value>
<Value ID="PAL">PAL (11:8)</Value>
<Value ID="Standard">Standard (4:3)</Value>
<Value ID="Widescreen">Widescreen (16:9)</Value>
</Enum>
<Enum ID="VideoFilterType">
<Value ID="None">None</Value>
<Value ID="NTSC">NTSC</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">Famicom</Value>
</Enum>
<Enum ID="ExpansionPortDevice">
<Value ID="None">None</Value>
<Value ID="Zapper">Zapper</Value>
<Value ID="FourPlayerAdapter">Four Player Adapter</Value>
<Value ID="ArkanoidController">Arkanoid Controller</Value>
</Enum>
<Enum ID="Language">
<Value ID="SystemDefault">User Account Default</Value>
<Value ID="English">English</Value>
<Value ID="French">Français</Value>
<Value ID="Japanese">日本語</Value>
</Enum>
</Enums>
</Resources>

View File

@ -0,0 +1,316 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resources>
<Forms>
<Form ID="frmMain" Title="Mesen">
<Control ID="mnuFile">Fichier</Control>
<Control ID="mnuOpen">Ouvrir</Control>
<Control ID="mnuSaveState">Sauvegarder</Control>
<Control ID="mnuLoadState">Charger</Control>
<Control ID="mnuRecentFiles">Fichier récents</Control>
<Control ID="mnuExit">Quitter</Control>
<Control ID="mnuGame">Jeu</Control>
<Control ID="mnuPause">Pause</Control>
<Control ID="mnuReset">Reset</Control>
<Control ID="mnuStop">Arrêt</Control>
<Control ID="mnuSwitchDiskSide">Changer le disque de côté</Control>
<Control ID="mnuSelectDisk">Choisir le disque</Control>
<Control ID="mnuEjectDisk">Éjecter le disque</Control>
<Control ID="mnuOptions">Options</Control>
<Control ID="mnuEmulationSpeed">Vitesse</Control>
<Control ID="mnuEmuSpeedNormal">Normale (100%)</Control>
<Control ID="mnuIncreaseSpeed">Augmenter la vitesse</Control>
<Control ID="mnuDecreaseSpeed">Réduire la vitesse</Control>
<Control ID="mnuEmuSpeedMaximumSpeed">Vitesse maximale</Control>
<Control ID="mnuEmuSpeedTriple">Triple (300%)</Control>
<Control ID="mnuEmuSpeedDouble">Double (200%)</Control>
<Control ID="mnuEmuSpeedHalf">Moitié (50%)</Control>
<Control ID="mnuEmuSpeedQuarter">Quart (25%)</Control>
<Control ID="mnuShowFPS">Afficher le FPS</Control>
<Control ID="mnuVideoScale">Taille de l'image</Control>
<Control ID="mnuScale1x">1x</Control>
<Control ID="mnuScale2x">2x</Control>
<Control ID="mnuScale3x">3x</Control>
<Control ID="mnuScale4x">4x</Control>
<Control ID="mnuScaleCustom">Personalisé</Control>
<Control ID="mnuFullscreen">Plein écran</Control>
<Control ID="mnuVideoFilter">Filtre vidéo</Control>
<Control ID="mnuNoneFilter">Aucun</Control>
<Control ID="mnuNtscFilter">NTSC</Control>
<Control ID="mnuAudioConfig">Audio</Control>
<Control ID="mnuInput">Manettes</Control>
<Control ID="mnuRegion">Région</Control>
<Control ID="mnuRegionAuto">Auto</Control>
<Control ID="mnuRegionNtsc">NTSC</Control>
<Control ID="mnuRegionPal">PAL</Control>
<Control ID="mnuRegionDendy">Dendy</Control>
<Control ID="mnuVideoConfig">Vidéo</Control>
<Control ID="mnuPreferences">Préférences</Control>
<Control ID="mnuTools">Outils</Control>
<Control ID="mnuNetPlay">Jeu en ligne</Control>
<Control ID="mnuStartServer">Démarrer un serveur</Control>
<Control ID="mnuConnect">Connexion à un serveur</Control>
<Control ID="mnuNetPlaySelectController">Choisir manette</Control>
<Control ID="mnuNetPlayPlayer1">Joueur 1</Control>
<Control ID="mnuNetPlayPlayer2">Joueur 2</Control>
<Control ID="mnuNetPlayPlayer3">Joueur 3</Control>
<Control ID="mnuNetPlayPlayer4">Joueur 4</Control>
<Control ID="mnuNetPlaySpectator">Spectateur</Control>
<Control ID="mnuFindServer">Trouver un serveur publique...</Control>
<Control ID="mnuProfile">Configurer votre profil</Control>
<Control ID="mnuMovies">Films</Control>
<Control ID="mnuPlayMovie">Jouer...</Control>
<Control ID="mnuRecordFrom">Enregistrer à partir...</Control>
<Control ID="mnuRecordFromStart">Du début du jeu</Control>
<Control ID="mnuRecordFromNow">De maintenant</Control>
<Control ID="mnuStopMovie">Arrêter</Control>
<Control ID="mnuCheats">Codes</Control>
<Control ID="mnuTests">Tests</Control>
<Control ID="mnuTestRun">Run...</Control>
<Control ID="mnuTestRecordFrom">Record from...</Control>
<Control ID="mnuTestRecordStart">Start</Control>
<Control ID="mnuTestRecordNow">Now</Control>
<Control ID="mnuTestRecordMovie">Movie</Control>
<Control ID="mnuTestRecordTest">Test</Control>
<Control ID="mnuTestStopRecording">Stop recording</Control>
<Control ID="mnuRunAllTests">Run all tests</Control>
<Control ID="mnuDebugger">Débogueur</Control>
<Control ID="mnuTakeScreenshot">Capture d'écran</Control>
<Control ID="mnuHelp">Aide</Control>
<Control ID="mnuCheckForUpdates">Recherche de mises-à-jour</Control>
<Control ID="mnuAbout">À propos de...</Control>
</Form>
<Form ID="frmAudioConfig" Title="Options audio">
<Control ID="tpgGeneral">Général</Control>
<Control ID="chkMuteSoundInBackground">Fermer le son lorsque Mesen est en arrière-plan</Control>
<Control ID="chkReduceSoundInBackground">Réduire le volume lorsque Mesen est en arrière-plan</Control>
<Control ID="chkEnableAudio">Activer le son</Control>
<Control ID="lblSampleRate">Taux d'échantillonnage:</Control>
<Control ID="lblLatencyMs">ms</Control>
<Control ID="lblAudioLatency">Latence:</Control>
<Control ID="lblAudioDevice">Périphérique:</Control>
<Control ID="tpgVolume">Volume</Control>
<Control ID="grpVolume">Volume</Control>
<Control ID="btnReset">Réinitialiser</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">Annuler</Control>
<Control ID="trkDmcVol">DMC</Control>
<Control ID="trkNoiseVol">Noise</Control>
<Control ID="trkTriangleVol">Triangle</Control>
<Control ID="trkSquare2Vol">Square 2</Control>
<Control ID="trkSquare1Vol">Square 1</Control>
<Control ID="trkMaster">Maitre</Control>
<Control ID="trkFdsVol">FDS</Control>
<Control ID="trkMmc5Vol">MMC5</Control>
<Control ID="trkVrc6Vol">VRC6</Control>
<Control ID="trkVrc7Vol">VRC7</Control>
<Control ID="trkNamco163Vol">Namco</Control>
<Control ID="trkSunsoft5b">Sunsoft</Control>
</Form>
<Form ID="frmInputConfig" Title="Configuration des manettes">
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">Annuler</Control>
<Control ID="tpgControllers">Manettes</Control>
<Control ID="btnSetupP4">Configuration</Control>
<Control ID="btnSetupP3">Configuration</Control>
<Control ID="lblPlayer1">Joueur 1:</Control>
<Control ID="lblPlayer2">Joueur 2:</Control>
<Control ID="lblPlayer4">Joueur 4:</Control>
<Control ID="lblPlayer3">Joueur 3:</Control>
<Control ID="btnSetupP1">Configuration</Control>
<Control ID="btnSetupP2">Configuration</Control>
<Control ID="lblNesType">Type de console :</Control>
<Control ID="lblExpansionPort">Port d'extension :</Control>
<Control ID="chkFourScore">Utiliser l'accessoire pour 4 joueurs</Control>
<Control ID="tpgEmulatorKeys">Raccourcis de l'émulateur</Control>
</Form>
<Form ID="frmControllerConfig" Title="Configuration de la manette">
<Control ID="lblTurboSpeed">Vitesse du mode turbo:</Control>
<Control ID="lblTurboFast">Rapide</Control>
<Control ID="lblSlow">Lente</Control>
<Control ID="tpgSet1">Mappage #1</Control>
<Control ID="tpgSet2">Mappage #2</Control>
<Control ID="tpgSet3">Mappage #3</Control>
<Control ID="tpgSet4">Mappage #4</Control>
<Control ID="btnReset">Réinitialiser</Control>
<Control ID="btnClear">Effacer le mappage</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">Annuler</Control>
</Form>
<Form ID="frmVideoConfig" Title="Options vidéo">
<Control ID="tpgGeneral">Général</Control>
<Control ID="lblVideoScale">Échelle :</Control>
<Control ID="lblVideoFilter">Filtre :</Control>
<Control ID="chkVerticalSync">Activer la synchronisation verticale</Control>
<Control ID="lblDisplayRatio">Format d'image :</Control>
<Control ID="lblEmuSpeedHint">(0 = Vitesse maximale)</Control>
<Control ID="lblEmulationSpeed">Vitesse d'émulation :</Control>
<Control ID="chkShowFps">Afficher le FPS</Control>
<Control ID="chkUseHdPacks">Utiliser les packs haute-définition de HDNes</Control>
<Control ID="tpgOverscan">Overscan</Control>
<Control ID="grpCropping">Overscan</Control>
<Control ID="lblLeft">Gauche</Control>
<Control ID="lblTop">Haut</Control>
<Control ID="lblBottom">Bas</Control>
<Control ID="lblRight">Droite</Control>
<Control ID="tpgPalette">Palette</Control>
<Control ID="btnResetPalette">Réinitialiser</Control>
<Control ID="btnLoadPalFile">Charger fichier .pal</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">Annuler</Control>
</Form>
<Form ID="frmPreferences" Title="Préférences">
<Control ID="tpgGeneral">Général</Control>
<Control ID="lblDisplayLanguage">Langue d'affichage :</Control>
<Control ID="chkSingleInstance">Permettre une seule copie de Mesen à la fois</Control>
<Control ID="chkAutomaticallyCheckForUpdates">Rechercher des mises-à-jour automatiquement</Control>
<Control ID="chkPauseOnMovieEnd">Pauser l'émulation à la fin d'un film</Control>
<Control ID="chkAllowBackgroundInput">Permettre les entrées lorsque Mesen est en arrière-plan</Control>
<Control ID="chkPauseWhenInBackground">Pauser l'émulation lorsque Mesen est en arrière-plan</Control>
<Control ID="chkAutoLoadIps">Charger les fichiers IPS automatiquement</Control>
<Control ID="chkDisableScreensaver">Désactiver l'économiseur d'écran pendant le jeu</Control>
<Control ID="btnOpenMesenFolder">Ouvrir le dossier de Mesen</Control>
<Control ID="tpgFileAssociations">Associations de fichiers</Control>
<Control ID="grpFileAssociations">Associations de fichiers</Control>
<Control ID="chkNesFormat">.NES</Control>
<Control ID="chkFdsFormat">.FDS (Famicom Disk System)</Control>
<Control ID="chkMmoFormat">.MMO (Films Mesen)</Control>
<Control ID="chkMstFormat">.MST (Savestate Mesen)</Control>
<Control ID="tpgAdvanced">Avancé</Control>
<Control ID="chkUseAlternativeMmc3Irq">Utiliser la version alternative du comportement des IRQs du MMC3</Control>
<Control ID="chkAllowInvalidInput">Permettre les entrées invalides (Bas+Haut ou Gauche+Droite en même temps)</Control>
<Control ID="chkRemoveSpriteLimit">Éliminer la limite de sprites (Réduit le clignotement dans certains jeux)</Control>
<Control ID="chkFdsAutoLoadDisk">Insérer le côté A du disque 1 lors du chargement d'un jeu de FDS</Control>
<Control ID="chkFdsFastForwardOnLoad">Augmenter la vitesse d'émulation pendant le chargement des jeux FDS</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">Annuler</Control>
</Form>
<Form ID="frmServerConfig" Title="Démarrer un serveur de jeu">
<Control ID="txtPort">8888</Control>
<Control ID="lblPort">Port:</Control>
<Control ID="chkPublicServer">Serveur publique</Control>
<Control ID="lblServerName">Nom du serveur :</Control>
<Control ID="chkSpectator">Permettre les spectateurs</Control>
<Control ID="lblMaxPlayers">Nombre de joueurs maximal :</Control>
<Control ID="lblPassword">Mot de passe:</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">Annuler</Control>
</Form>
<Form ID="frmClientConfig" Title="Connexion à un serveur">
<Control ID="txtPort">8888</Control>
<Control ID="lblHost">Serveur hôte:</Control>
<Control ID="lblPort">Port:</Control>
<Control ID="chkSpectator">Se joindre en tant que spectateur</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">Annuler</Control>
</Form>
<Form ID="frmCheatList" Title="Liste de codes">
<Control ID="tabCheats">Codes</Control>
<Control ID="chkCurrentGameOnly">Afficher uniquement les codes pour le jeu en cours</Control>
<Control ID="btnAddCheat">Ajouter un code</Control>
<Control ID="btnDeleteCheat">Effacer les codes sélectionnés</Control>
<Control ID="mnuAddCheat">Ajouter un code</Control>
<Control ID="mnuDeleteCheat">Effacer</Control>
<Control ID="colGameName">Jeu</Control>
<Control ID="colCheatName">Nom du code</Control>
<Control ID="colCode">Code</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">Annuler</Control>
</Form>
<Form ID="frmCheat" Title="Code">
<Control ID="label2">Jeu:</Control>
<Control ID="label1">Nom du code :</Control>
<Control ID="grpCode">Code</Control>
<Control ID="radCustom">Personalisé :</Control>
<Control ID="radGameGenie">Game Genie :</Control>
<Control ID="radProActionRocky">Pro Action Rocky :</Control>
<Control ID="lblAddress">Adresse :</Control>
<Control ID="lblNewValue">Nouvelle valeur :</Control>
<Control ID="radRelativeAddress">Mémoire</Control>
<Control ID="radAbsoluteAddress">Code du jeu</Control>
<Control ID="chkCompareValue">Valeur de comparaison</Control>
<Control ID="btnBrowse">Parcourir...</Control>
<Control ID="chkEnabled">Code activé</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">Annuler</Control>
</Form>
<Form ID="frmAbout" Title="À propos de...">
<Control ID="labelProductName">Mesen</Control>
<Control ID="labelCopyright">© 2016 M. Bibaud (aka Sour)</Control>
<Control ID="lblWebsite">Site web:</Control>
<Control ID="lblLink">www.mesen.ca</Control>
<Control ID="labelVersion">Version: 0.1.1 (Beta)</Control>
<Control ID="okButton">&amp;OK</Control>
<Control ID="lblDonate">Mesen est gratuit. Par contre, si vous voulez supporter son dévelopement, cliquez sur le lien ci-dessous pour plus d'information. Thank you!</Control>
<Control ID="lnkDonate">Pour plus d'information, cliquez ici.</Control>
</Form>
</Forms>
<Messages>
<Message ID="FilterAll">Tous les fichiers (*.*)|*.*</Message>
<Message ID="FilterMovie">Films (*.mmo)|*.mmo|All (*.*)|*.*</Message>
<Message ID="FilterPalette">Fichier de palette (*.pal)|*.pal|All Files (*.*)|*.*</Message>
<Message ID="FilterRom">Tous les formats supportés (*.nes, *.zip, *.fds)|*.NES;*.ZIP;*.FDS|Roms de NES (*.nes)|*.NES|Roms du Famicom Disk System (*.fds)|*.FDS|Fichiers ZIP (*.zip)|*.ZIP|All (*.*)|*.*</Message>
<Message ID="FilterRomIps">Tous les formats supportés (*.nes, *.zip, *.fds, *.ips)|*.NES;*.ZIP;*.IPS;*.FDS|Roms de NES(*.nes)|*.NES|Roms du Famicom Disk System (*.fds)|*.FDS|Fichiers ZIP (*.zip)|*.ZIP|Fichiers IPS (*.ips)|*.IPS|All (*.*)|*.*</Message>
<Message ID="FilterTest">Fichiers de test (*.mtp)|*.mtp|All (*.*)|*.*</Message>
<Message ID="Resume">Continuer</Message>
<Message ID="Pause">Pause</Message>
<Message ID="StartServer">Démarrer serveur</Message>
<Message ID="StopServer">Arrêter le serveur</Message>
<Message ID="ConnectToServer">Connexion à un serveur</Message>
<Message ID="Disconnect">Deconnexion</Message>
<Message ID="PlayerNumber">Joueur {0}</Message>
<Message ID="CouldNotInstallRuntime">Le package Redistribuable Visual C++ pour Visual Studio 2015 n'a pas été installé correctement.</Message>
<Message ID="EmptyState">&lt;aucune sauvegarde&gt;</Message>
<Message ID="ErrorWhileCheckingUpdates">Une erreur s'est produite lors de la recherche de mises-à-jour.&#xA;&#xA;Détails de l'erreur :&#xA;{0}</Message>
<Message ID="FdsBiosNotFound">Un bios pour le FDS n'a pas été trouvé. Le bios est requis pour jouer à des jeux de FDS.&#xA;&#xA;Voulez-vous sélectionnez un bios maintenant?</Message>
<Message ID="FdsDiskSide">Disque {0} Côté {1}</Message>
<Message ID="FileNotFound">Fichier non trouvé: {0}</Message>
<Message ID="InvalidFdsBios">Le bios sélectionné est invalide.</Message>
<Message ID="HDNesTooltip">Cette option permet à Mesen de charger des packages de graphiques haute-résolution dans le même format que l'émulateur HDNes.&#xA;&#xA;Les packages haute-résolution doivent être placés dans le dossier "HdPacks", dans un sous-dossier correspondant au nom du ROM.&#xA;Exemple : Un package pour "MonRom.nes" doit être placé dans "HdPacks\MonRom\hires.txt".&#xA;&#xA;Note: Le support pour les packages haute-résolution n'est pas encore parfait - certaines limitations sont encore présentes.</Message>
<Message ID="MesenUpToDate">Vous utilisez déjà la version la plus récente de Mesen.</Message>
<Message ID="PatchAndReset">Appliquer la patch et faire un reset du jeu?</Message>
<Message ID="SelectRomIps">Choisissez un ROM qui correspond au fichier IPS choisi.</Message>
<Message ID="UnableToDownload">Impossible de télécharger le fichier. Vérifier votre connexion internet et essayez à nouveau.&#xA;&#xA;Détails de l'erreur:</Message>
<Message ID="UnableToStartMissingDependencies">Mesen doit télécharger et installer le package Redistribuable Visual C++ pour Microsoft Visual Studio 2015 avant de pouvoir continuer. Voulez-vous l'installer maintenant?"</Message>
<Message ID="UnableToStartMissingFiles">Mesen est incapable de démarrer puisqu'il manque des fichiers.&#xA;&#xA;Erreur: Le fichier WinMesen.dll est introuvable.</Message>
<Message ID="UnexpectedError">Une erreur inattendue s'est produite.&#xA;&#xA;Détails de l'erreur :&#xA;{0}</Message>
<Message ID="UpdateDownloadFailed">Le téléchargement a échoué - le fichier semble être corrompu. Veuillez visiter le site de Mesen pour télécharger manuellement la version la plus récente.</Message>
<Message ID="UpgradeSuccess">La mise-à-jour s'est faite avec succès.</Message>
</Messages>
<Enums>
<Enum ID="ControllerType">
<Value ID="None">Aucune</Value>
<Value ID="StandardController">Manette standard</Value>
<Value ID="Zapper">Zapper</Value>
<Value ID="ArkanoidController">Manette Arkanoid</Value>
</Enum>
<Enum ID="VideoAspectRatio">
<Value ID="Auto">Auto</Value>
<Value ID="NTSC">NTSC (8:7)</Value>
<Value ID="PAL">PAL (11:8)</Value>
<Value ID="Standard">Standard (4:3)</Value>
<Value ID="Widescreen">Écran large (16:9)</Value>
</Enum>
<Enum ID="VideoFilterType">
<Value ID="None">Aucun</Value>
<Value ID="NTSC">NTSC</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">Famicom</Value>
</Enum>
<Enum ID="ExpansionPortDevice">
<Value ID="None">Aucun</Value>
<Value ID="Zapper">Zapper</Value>
<Value ID="FourPlayerAdapter">Adapteur pour 4 joueurs</Value>
<Value ID="ArkanoidController">Manette Arkanoid</Value>
</Enum>
<Enum ID="Language">
<Value ID="SystemDefault">Défaut du compte utilisateur</Value>
<Value ID="English">English</Value>
<Value ID="French">Français</Value>
<Value ID="Japanese">日本語</Value>
</Enum>
</Enums>
</Resources>

View File

@ -0,0 +1,314 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resources>
<Forms>
<Form ID="frmMain" Title="Mesen">
<Control ID="mnuFile">ファイル</Control>
<Control ID="mnuOpen">開く</Control>
<Control ID="mnuSaveState">クイックセーブ</Control>
<Control ID="mnuLoadState">クイックロード</Control>
<Control ID="mnuRecentFiles">最近開いたファイル</Control>
<Control ID="mnuExit">終わる</Control>
<Control ID="mnuGame">ゲーム</Control>
<Control ID="mnuPause">ポーズ</Control>
<Control ID="mnuReset">リセット</Control>
<Control ID="mnuStop">停止</Control>
<Control ID="mnuSwitchDiskSide">A面B面切り替え</Control>
<Control ID="mnuSelectDisk">ディスク選択</Control>
<Control ID="mnuEjectDisk">ディスクを取り出す</Control>
<Control ID="mnuOptions">設定</Control>
<Control ID="mnuEmulationSpeed">速度</Control>
<Control ID="mnuEmuSpeedNormal">通常 (100%)</Control>
<Control ID="mnuIncreaseSpeed">速度を上げる</Control>
<Control ID="mnuDecreaseSpeed">速度を下げる</Control>
<Control ID="mnuEmuSpeedMaximumSpeed">最高速度</Control>
<Control ID="mnuEmuSpeedTriple">300%</Control>
<Control ID="mnuEmuSpeedDouble">200%</Control>
<Control ID="mnuEmuSpeedHalf">50%</Control>
<Control ID="mnuEmuSpeedQuarter">25%</Control>
<Control ID="mnuShowFPS">フレームレート表示</Control>
<Control ID="mnuVideoScale">映像サイズ</Control>
<Control ID="mnuScale1x">1倍</Control>
<Control ID="mnuScale2x">2倍</Control>
<Control ID="mnuScale3x">3倍</Control>
<Control ID="mnuScale4x">4倍</Control>
<Control ID="mnuScaleCustom">カスタム</Control>
<Control ID="mnuFullscreen">全画面表示</Control>
<Control ID="mnuVideoFilter">画面エフェクト</Control>
<Control ID="mnuNoneFilter">なし</Control>
<Control ID="mnuNtscFilter">NTSC</Control>
<Control ID="mnuAudioConfig">音声</Control>
<Control ID="mnuInput">コントローラ</Control>
<Control ID="mnuRegion">地域</Control>
<Control ID="mnuRegionAuto">Auto</Control>
<Control ID="mnuRegionNtsc">NTSC</Control>
<Control ID="mnuRegionPal">PAL</Control>
<Control ID="mnuRegionDendy">Dendy</Control>
<Control ID="mnuVideoConfig">映像</Control>
<Control ID="mnuPreferences">設定</Control>
<Control ID="mnuTools">ツール</Control>
<Control ID="mnuNetPlay">ネットプレイ</Control>
<Control ID="mnuStartServer">サーバを起動する</Control>
<Control ID="mnuConnect">サーバに接続</Control>
<Control ID="mnuNetPlaySelectController">コントローラを選ぶ</Control>
<Control ID="mnuNetPlayPlayer1">プレーヤー 1</Control>
<Control ID="mnuNetPlayPlayer2">プレーヤー 2</Control>
<Control ID="mnuNetPlayPlayer3">プレーヤー 3</Control>
<Control ID="mnuNetPlayPlayer4">プレーヤー 4</Control>
<Control ID="mnuNetPlaySpectator">観客</Control>
<Control ID="mnuFindServer">公開セーバリストを見る</Control>
<Control ID="mnuProfile">プロファイル設定</Control>
<Control ID="mnuMovies">動画</Control>
<Control ID="mnuPlayMovie">再生</Control>
<Control ID="mnuRecordFrom">録画</Control>
<Control ID="mnuRecordFromStart">最初から</Control>
<Control ID="mnuRecordFromNow">この時点から</Control>
<Control ID="mnuStopMovie">停止</Control>
<Control ID="mnuCheats">チートコード</Control>
<Control ID="mnuTests">テスト</Control>
<Control ID="mnuTestRun">Run...</Control>
<Control ID="mnuTestRecordFrom">Record from...</Control>
<Control ID="mnuTestRecordStart">Start</Control>
<Control ID="mnuTestRecordNow">Now</Control>
<Control ID="mnuTestRecordMovie">Movie</Control>
<Control ID="mnuTestRecordTest">Test</Control>
<Control ID="mnuTestStopRecording">Stop recording</Control>
<Control ID="mnuRunAllTests">Run all tests</Control>
<Control ID="mnuDebugger">デバッガ</Control>
<Control ID="mnuTakeScreenshot">スクリーンショットを撮る</Control>
<Control ID="mnuHelp">ヘルプ</Control>
<Control ID="mnuCheckForUpdates">アップデートの確認</Control>
<Control ID="mnuAbout">Mesenとは</Control>
</Form>
<Form ID="frmAudioConfig" Title="音声設定">
<Control ID="tpgGeneral">全般</Control>
<Control ID="chkMuteSoundInBackground">Mesenが最前面ではない時、音声をミュートにする</Control>
<Control ID="chkReduceSoundInBackground">Mesenが最前面ではない時、音声を低くする</Control>
<Control ID="chkEnableAudio">音声オン</Control>
<Control ID="lblSampleRate">サンプルレート:</Control>
<Control ID="lblLatencyMs">ミリ秒</Control>
<Control ID="lblAudioLatency">レイテンシ:</Control>
<Control ID="lblAudioDevice">デバイス:</Control>
<Control ID="tpgVolume">音量ミキサー</Control>
<Control ID="grpVolume">音量ミキサー</Control>
<Control ID="btnReset">リセット</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">キャンセル</Control>
<Control ID="trkDmcVol">DMC</Control>
<Control ID="trkNoiseVol">Noise</Control>
<Control ID="trkTriangleVol">Triangle</Control>
<Control ID="trkSquare2Vol">Square 2</Control>
<Control ID="trkSquare1Vol">Square 1</Control>
<Control ID="trkMaster">マスター</Control>
<Control ID="trkFdsVol">FDS</Control>
<Control ID="trkMmc5Vol">MMC5</Control>
<Control ID="trkVrc6Vol">VRC6</Control>
<Control ID="trkVrc7Vol">VRC7</Control>
<Control ID="trkNamco163Vol">Namco</Control>
<Control ID="trkSunsoft5b">Sunsoft</Control>
</Form>
<Form ID="frmInputConfig" Title="コントローラ設定">
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">キャンセル</Control>
<Control ID="tpgControllers">コントローラ</Control>
<Control ID="btnSetupP4">設定</Control>
<Control ID="btnSetupP3">設定</Control>
<Control ID="lblPlayer1">プレーヤー 1:</Control>
<Control ID="lblPlayer2">プレーヤー 2:</Control>
<Control ID="lblPlayer4">プレーヤー 4:</Control>
<Control ID="lblPlayer3">プレーヤー 3:</Control>
<Control ID="btnSetupP1">設定</Control>
<Control ID="btnSetupP2">設定</Control>
<Control ID="lblNesType">ゲーム機:</Control>
<Control ID="lblExpansionPort">拡張ポート:</Control>
<Control ID="chkFourScore">Four Scoreを使う</Control>
<Control ID="tpgEmulatorKeys">ショートカットキー</Control>
</Form>
<Form ID="frmControllerConfig" Title="コントローラ設定">
<Control ID="lblTurboSpeed">ターボの速度:</Control>
<Control ID="lblTurboFast">速い</Control>
<Control ID="lblSlow">遅い</Control>
<Control ID="tpgSet1">キーセット 1</Control>
<Control ID="tpgSet2">キーセット 2</Control>
<Control ID="tpgSet3">キーセット 3</Control>
<Control ID="tpgSet4">キーセット 4</Control>
<Control ID="btnReset">リセット</Control>
<Control ID="btnClear">キーセットを削除</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">キャンセル</Control>
</Form>
<Form ID="frmVideoConfig" Title="映像設定">
<Control ID="tpgGeneral">全般</Control>
<Control ID="lblVideoScale">映像サイズ:</Control>
<Control ID="lblVideoFilter">画面エフェクト:</Control>
<Control ID="chkVerticalSync">垂直同期を有効する</Control>
<Control ID="lblDisplayRatio">画面アスペクト:</Control>
<Control ID="lblEmuSpeedHint">(0 = 最高速度)</Control>
<Control ID="lblEmulationSpeed">エミュレーションの速度:</Control>
<Control ID="chkShowFps">フレームレート表示</Control>
<Control ID="chkUseHdPacks">HDNesのHDパックを使う</Control>
<Control ID="tpgOverscan">オーバースキャン</Control>
<Control ID="grpCropping">オーバースキャン</Control>
<Control ID="lblLeft"></Control>
<Control ID="lblTop"></Control>
<Control ID="lblBottom"></Control>
<Control ID="lblRight"></Control>
<Control ID="tpgPalette">パレット</Control>
<Control ID="btnResetPalette">リセット</Control>
<Control ID="btnLoadPalFile">.palファイルをロードする</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">キャンセル</Control>
</Form>
<Form ID="frmPreferences" Title="設定">
<Control ID="tpgGeneral">全般</Control>
<Control ID="lblDisplayLanguage">言語:</Control>
<Control ID="chkSingleInstance">Mesenを単一インスタンスモードにする</Control>
<Control ID="chkAutomaticallyCheckForUpdates">自動的にアップデートを確認</Control>
<Control ID="chkPauseOnMovieEnd">動画が終わると自動的にポーズする</Control>
<Control ID="chkAllowBackgroundInput">Mesenが最前面ではない時、コントローラは反応しない</Control>
<Control ID="chkPauseWhenInBackground">Mesenが最前面ではない時、自動的にポーズする</Control>
<Control ID="chkAutoLoadIps">自動的にIPSファイルをロードする</Control>
<Control ID="chkDisableScreensaver">ゲーム中にスクリーンセーバーを無効にする</Control>
<Control ID="btnOpenMesenFolder">Mesenのフォルダを開く</Control>
<Control ID="tpgFileAssociations">ファイルの関連付け</Control>
<Control ID="grpFileAssociations">ファイルの関連付け</Control>
<Control ID="chkNesFormat">.NES (ファミコン)</Control>
<Control ID="chkFdsFormat">.FDS (ファミコンディスクシステム)</Control>
<Control ID="chkMmoFormat">.MMO (Mesenの動画)</Control>
<Control ID="chkMstFormat">.MST (Mesenのクイックセーブ)</Control>
<Control ID="tpgAdvanced">詳細設定</Control>
<Control ID="chkUseAlternativeMmc3Irq">MMC3AのIRQ仕様を使う</Control>
<Control ID="chkAllowInvalidInput">コントローラでは不可能インプットを可能にする (同時に上と下や右と左)</Control>
<Control ID="chkRemoveSpriteLimit">スプライトの制限を解除 (点滅を軽減する)</Control>
<Control ID="chkFdsAutoLoadDisk">ファミコンディスクシステムのゲームをロードする時に自動的にディスクのA面を入れる</Control>
<Control ID="chkFdsFastForwardOnLoad">ファミコンディスクシステムのゲームをディスクからロードする時に自動的に最高速度にする</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">キャンセル</Control>
</Form>
<Form ID="frmServerConfig" Title="サーバを起動する">
<Control ID="lblPort">ポート:</Control>
<Control ID="chkPublicServer">公開サーバ</Control>
<Control ID="lblServerName">サーバ名:</Control>
<Control ID="chkSpectator">観客として接続するのは可能にする</Control>
<Control ID="lblMaxPlayers">プレーヤーの最大数:</Control>
<Control ID="lblPassword">パスワード:</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">キャンセル</Control>
</Form>
<Form ID="frmClientConfig" Title="サーバに接続">
<Control ID="lblHost">ホスト:</Control>
<Control ID="lblPort">ポート:</Control>
<Control ID="chkSpectator">観客として接続する</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">キャンセル</Control>
</Form>
<Form ID="frmCheatList" Title="チートコード">
<Control ID="tabCheats">チートコード</Control>
<Control ID="chkCurrentGameOnly">プレイ中のゲームのコードのみ表示する</Control>
<Control ID="btnAddCheat">コード追加</Control>
<Control ID="btnDeleteCheat">選択中のコードを削除</Control>
<Control ID="mnuAddCheat">コード追加</Control>
<Control ID="mnuDeleteCheat">削除</Control>
<Control ID="colGameName">ゲーム</Control>
<Control ID="colCheatName">コード名</Control>
<Control ID="colCode">コード</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">キャンセル</Control>
</Form>
<Form ID="frmCheat" Title="コード">
<Control ID="label2">ゲーム:</Control>
<Control ID="label1">コード名:</Control>
<Control ID="grpCode">コード</Control>
<Control ID="radCustom">カスタム:</Control>
<Control ID="radGameGenie">Game Genie:</Control>
<Control ID="radProActionRocky">Pro Action Rocky:</Control>
<Control ID="lblAddress">メモリアドレス:</Control>
<Control ID="lblNewValue">バイト値:</Control>
<Control ID="radRelativeAddress">メモリ</Control>
<Control ID="radAbsoluteAddress">ゲームのコード</Control>
<Control ID="chkCompareValue">比較値</Control>
<Control ID="btnBrowse">参照...</Control>
<Control ID="chkEnabled">コードを有効にする</Control>
<Control ID="btnOK">OK</Control>
<Control ID="btnCancel">キャンセル</Control>
</Form>
<Form ID="frmAbout" Title="Mesenとは">
<Control ID="labelProductName">Mesen</Control>
<Control ID="labelCopyright">© 2016 M. Bibaud (aka Sour)</Control>
<Control ID="lblWebsite">サイト:</Control>
<Control ID="lblLink">www.mesen.ca</Control>
<Control ID="labelVersion">バージョン: 0.1.1 (Beta)</Control>
<Control ID="okButton">&amp;OK</Control>
<Control ID="lblDonate">Mesen est gratuit. Par contre, si vous voulez supporter son dévelopement, cliquez sur le lien ci-dessous pour plus d'information. Thank you!</Control>
<Control ID="lnkDonate">Pour plus d'information, cliquez ici.</Control>
</Form>
</Forms>
<Messages>
<Message ID="FilterAll">すべてのファイル (*.*)|*.*</Message>
<Message ID="FilterMovie">動画 (*.mmo)|*.mmo|すべてのファイル (*.*)|*.*</Message>
<Message ID="FilterPalette">パレットファイル (*.pal)|*.pal|すべてのファイル (*.*)|*.*</Message>
<Message ID="FilterRom">対応するすべてのファイル (*.nes, *.zip, *.fds)|*.NES;*.ZIP;*.FDS|ファミコンゲーム (*.nes)|*.NES|ファミコンディスクシステムのゲーム (*.fds)|*.FDS|ZIPファイル (*.zip)|*.ZIP|すべてのファイル (*.*)|*.*</Message>
<Message ID="FilterRomIps">対応するすべてのファイル (*.nes, *.zip, *.fds, *.ips)|*.NES;*.ZIP;*.IPS;*.FDS|ファミコンゲーム (*.nes)|*.NES|ファミコンディスクシステムのゲーム (*.fds)|*.FDS|ZIPファイル (*.zip)|*.ZIP|IPSファイル (*.ips)|*.IPS|すべてのファイル (*.*)|*.*</Message>
<Message ID="FilterTest">テストファイル (*.mtp)|*.mtp|すべてのファイル (*.*)|*.*</Message>
<Message ID="Resume">再開</Message>
<Message ID="Pause">ポーズ</Message>
<Message ID="StartServer">サーバを起動する</Message>
<Message ID="StopServer">サーバを停止する</Message>
<Message ID="ConnectToServer">サーバに接続する</Message>
<Message ID="Disconnect">切断</Message>
<Message ID="PlayerNumber">プレーヤー {0}</Message>
<Message ID="CouldNotInstallRuntime">Microsoft Visual Studio 2015のVisual C++再頒布可能パッケージはインストールできませんでした。</Message>
<Message ID="EmptyState">&lt;なし&gt;</Message>
<Message ID="ErrorWhileCheckingUpdates">アップデートを確認する時にエラーが発生しました。&#xA;&#xA;エラーの詳細:&#xA;{0}</Message>
<Message ID="FdsBiosNotFound">ファミコンディスクシステム(FDS)のゲームをロードするためにFDSのBIOSファイルは必要です。&#xA;&#xA;FDSのBIOSファイルを選びますか</Message>
<Message ID="FdsDiskSide">ディスク{0} {1}面</Message>
<Message ID="FileNotFound">ファイルが見つかりません: {0}</Message>
<Message ID="InvalidFdsBios">選んだBIOSファイルは使えません。</Message>
<Message ID="HDNesTooltip">このオプションを有効にすれば、MesenはHDNesのようにHDパックをロード出来るようになります。&#xA;&#xA;HDパックはMesenのフォルダの中にある「HdPacks」のフォルダにゲームと同じ名前のサブフォルダに置くと自動的にロードされます。&#xA;ゲームファイルは「MyRom.nes」なら、「HdPacks\MyRom」にHDパックを置くとロードされます。&#xA;&#xA;この機能はまだ開発中で、不完全なところがあります、ご了承ください。</Message>
<Message ID="MesenUpToDate">既にMesenの最新のバージョンを使っています。</Message>
<Message ID="PatchAndReset">IPSパッチを当てて、ゲームをリセットしますか</Message>
<Message ID="SelectRomIps">IPSファイルに合うゲームファイルを選んでください。</Message>
<Message ID="UnableToDownload">ファイルをダウンロードできませんでした。ネット接続を確認してから、再試行してください。&#xA;&#xA;エラーの詳細:</Message>
<Message ID="UnableToStartMissingDependencies">MesenはMicrosoft Visual Studio 2015のVisual C++再頒布可能パッケージなしではゲームをロードできません。 パッケージを自動的にMicrosoftのサーバからダウンロードして、インストールしますか</Message>
<Message ID="UnableToStartMissingFiles">必要なファイルはロード出来なかったため、Mesenは起動できません。&#xA;&#xA;エラー: WinMesen.dllはロードできません。</Message>
<Message ID="UnexpectedError">予期しないエラーが発生しました。&#xA;&#xA;エラーの詳細:&#xA;{0}</Message>
<Message ID="UpdateDownloadFailed">ダウンロードは失敗しました。 Mesenのサイトに行って、新しいバージョンをダウンロードしてください。</Message>
<Message ID="UpgradeSuccess">アップデートは完了しました。</Message>
</Messages>
<Enums>
<Enum ID="ControllerType">
<Value ID="None">なし</Value>
<Value ID="StandardController">ファミコンコントローラ</Value>
<Value ID="Zapper">ガン</Value>
<Value ID="ArkanoidController">Arkanoidコントローラ</Value>
</Enum>
<Enum ID="VideoAspectRatio">
<Value ID="Auto">オート</Value>
<Value ID="NTSC">NTSC (8:7)</Value>
<Value ID="PAL">PAL (11:8)</Value>
<Value ID="Standard">ノーマル (4:3)</Value>
<Value ID="Widescreen">ワイド (16:9)</Value>
</Enum>
<Enum ID="VideoFilterType">
<Value ID="None">なし</Value>
<Value ID="NTSC">NTSC</Value>
</Enum>
<Enum ID="ConsoleType">
<Value ID="Nes">NES</Value>
<Value ID="Famicom">ファミコン</Value>
</Enum>
<Enum ID="ExpansionPortDevice">
<Value ID="None">なし</Value>
<Value ID="Zapper">ガン</Value>
<Value ID="FourPlayerAdapter">4-Player Adapter</Value>
<Value ID="ArkanoidController">Arkanoidコントローラ</Value>
</Enum>
<Enum ID="Language">
<Value ID="SystemDefault">ユーザーアカウントのデフォルト</Value>
<Value ID="English">English</Value>
<Value ID="French">Français</Value>
<Value ID="Japanese">日本語</Value>
</Enum>
</Enums>
</Resources>

View File

@ -134,7 +134,9 @@ namespace Mesen.GUI.Forms
ComboBox combo = ((ComboBox)bindedField);
combo.DropDownStyle = ComboBoxStyle.DropDownList;
combo.Items.Clear();
combo.Items.AddRange(Enum.GetNames(fieldType));
foreach(Enum value in Enum.GetValues(fieldType)) {
combo.Items.Add(ResourceHelper.GetEnumText(value));
}
}
_bindings[fieldName] = bindedField;
} else {
@ -188,7 +190,7 @@ namespace Mesen.GUI.Forms
} else if(kvp.Value is ComboBox) {
ComboBox combo = kvp.Value as ComboBox;
if(value is Enum) {
combo.SelectedItem = value.ToString();
combo.SelectedItem = ResourceHelper.GetEnumText((Enum)value);
} else if(field.FieldType == typeof(UInt32)) {
for(int i = 0, len = combo.Items.Count; i < len; i++) {
UInt32 numericValue;
@ -255,7 +257,13 @@ namespace Mesen.GUI.Forms
} else if(kvp.Value is ComboBox) {
if(field.FieldType.IsSubclassOf(typeof(Enum))) {
object selectedItem = ((ComboBox)kvp.Value).SelectedItem;
field.SetValue(Entity, selectedItem == null ? 0 : Enum.Parse(field.FieldType, selectedItem.ToString()));
foreach(Enum value in Enum.GetValues(field.FieldType)) {
if(ResourceHelper.GetEnumText(value) == selectedItem.ToString()) {
field.SetValue(Entity, value);
break;
}
}
} else if(field.FieldType == typeof(UInt32)) {
UInt32 numericValue;
string item = Regex.Replace(((ComboBox)kvp.Value).SelectedItem.ToString(), "[^0-9]", "");

View File

@ -15,6 +15,7 @@ namespace Mesen.GUI.Forms
private System.ComponentModel.IContainer components;
private bool _iconSet = false;
public BaseForm()
{
InitializeComponent();
@ -57,6 +58,7 @@ namespace Mesen.GUI.Forms
int tabIndex = 0;
InitializeTabIndexes(this, ref tabIndex);
ResourceHelper.ApplyResources(this);
}
private void InitializeTabIndexes(TableLayoutPanel tlp, ref int tabIndex)

View File

@ -29,6 +29,7 @@
{
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.label2 = new System.Windows.Forms.Label();
this.btnBrowse = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.txtCheatName = new System.Windows.Forms.TextBox();
this.grpCode = new System.Windows.Forms.GroupBox();
@ -48,16 +49,13 @@
this.txtValue = new System.Windows.Forms.TextBox();
this.txtCompare = new System.Windows.Forms.TextBox();
this.chkCompareValue = new System.Windows.Forms.CheckBox();
this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel();
this.txtGameName = new System.Windows.Forms.TextBox();
this.btnBrowse = new System.Windows.Forms.Button();
this.chkEnabled = new System.Windows.Forms.CheckBox();
this.txtGameName = new System.Windows.Forms.TextBox();
this.tableLayoutPanel2.SuspendLayout();
this.grpCode.SuspendLayout();
this.tlpAdd.SuspendLayout();
this.tlpCustom.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
this.flowLayoutPanel3.SuspendLayout();
this.SuspendLayout();
//
// baseConfigPanel
@ -67,15 +65,17 @@
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnCount = 3;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel2.Controls.Add(this.label2, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.btnBrowse, 2, 0);
this.tableLayoutPanel2.Controls.Add(this.label1, 0, 1);
this.tableLayoutPanel2.Controls.Add(this.txtCheatName, 1, 1);
this.tableLayoutPanel2.Controls.Add(this.grpCode, 0, 3);
this.tableLayoutPanel2.Controls.Add(this.flowLayoutPanel3, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.chkEnabled, 0, 2);
this.tableLayoutPanel2.Controls.Add(this.txtGameName, 1, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
@ -91,17 +91,28 @@
//
this.label2.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(3, 6);
this.label2.Location = new System.Drawing.Point(3, 8);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(38, 13);
this.label2.TabIndex = 4;
this.label2.Text = "Game:";
//
// btnBrowse
//
this.btnBrowse.AutoSize = true;
this.btnBrowse.Location = new System.Drawing.Point(321, 3);
this.btnBrowse.Name = "btnBrowse";
this.btnBrowse.Size = new System.Drawing.Size(61, 23);
this.btnBrowse.TabIndex = 1;
this.btnBrowse.Text = "Browse...";
this.btnBrowse.UseVisualStyleBackColor = true;
this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
//
// label1
//
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 32);
this.label1.Location = new System.Drawing.Point(3, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(69, 13);
this.label1.TabIndex = 1;
@ -109,8 +120,9 @@
//
// txtCheatName
//
this.tableLayoutPanel2.SetColumnSpan(this.txtCheatName, 2);
this.txtCheatName.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtCheatName.Location = new System.Drawing.Point(78, 29);
this.txtCheatName.Location = new System.Drawing.Point(78, 32);
this.txtCheatName.MaxLength = 255;
this.txtCheatName.Name = "txtCheatName";
this.txtCheatName.Size = new System.Drawing.Size(304, 20);
@ -118,12 +130,12 @@
//
// grpCode
//
this.tableLayoutPanel2.SetColumnSpan(this.grpCode, 2);
this.tableLayoutPanel2.SetColumnSpan(this.grpCode, 3);
this.grpCode.Controls.Add(this.tlpAdd);
this.grpCode.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpCode.Location = new System.Drawing.Point(3, 78);
this.grpCode.Location = new System.Drawing.Point(3, 81);
this.grpCode.Name = "grpCode";
this.grpCode.Size = new System.Drawing.Size(379, 184);
this.grpCode.Size = new System.Drawing.Size(379, 181);
this.grpCode.TabIndex = 3;
this.grpCode.TabStop = false;
this.grpCode.Text = "Code";
@ -146,7 +158,7 @@
this.tlpAdd.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpAdd.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpAdd.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpAdd.Size = new System.Drawing.Size(373, 165);
this.tlpAdd.Size = new System.Drawing.Size(373, 162);
this.tlpAdd.TabIndex = 0;
//
// radCustom
@ -220,7 +232,7 @@
this.tlpCustom.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpCustom.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpCustom.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpCustom.Size = new System.Drawing.Size(250, 107);
this.tlpCustom.Size = new System.Drawing.Size(250, 104);
this.tlpCustom.TabIndex = 4;
//
// lblAddress
@ -309,61 +321,45 @@
//
this.chkCompareValue.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkCompareValue.AutoSize = true;
this.chkCompareValue.Location = new System.Drawing.Point(3, 86);
this.chkCompareValue.Location = new System.Drawing.Point(3, 85);
this.chkCompareValue.Margin = new System.Windows.Forms.Padding(3, 6, 3, 3);
this.chkCompareValue.Name = "chkCompareValue";
this.chkCompareValue.Size = new System.Drawing.Size(98, 17);
this.chkCompareValue.Size = new System.Drawing.Size(98, 16);
this.chkCompareValue.TabIndex = 7;
this.chkCompareValue.Text = "Compare Value";
this.chkCompareValue.UseVisualStyleBackColor = true;
this.chkCompareValue.CheckedChanged += new System.EventHandler(this.chkCompareValue_CheckedChanged);
//
// flowLayoutPanel3
//
this.flowLayoutPanel3.Controls.Add(this.txtGameName);
this.flowLayoutPanel3.Controls.Add(this.btnBrowse);
this.flowLayoutPanel3.Location = new System.Drawing.Point(75, 0);
this.flowLayoutPanel3.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel3.Name = "flowLayoutPanel3";
this.flowLayoutPanel3.Size = new System.Drawing.Size(310, 26);
this.flowLayoutPanel3.TabIndex = 5;
//
// txtGameName
//
this.txtGameName.Location = new System.Drawing.Point(3, 3);
this.txtGameName.Name = "txtGameName";
this.txtGameName.ReadOnly = true;
this.txtGameName.Size = new System.Drawing.Size(223, 20);
this.txtGameName.TabIndex = 0;
//
// btnBrowse
//
this.btnBrowse.Location = new System.Drawing.Point(232, 3);
this.btnBrowse.Name = "btnBrowse";
this.btnBrowse.Size = new System.Drawing.Size(75, 23);
this.btnBrowse.TabIndex = 1;
this.btnBrowse.Text = "Browse...";
this.btnBrowse.UseVisualStyleBackColor = true;
this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
//
// chkEnabled
//
this.chkEnabled.AutoSize = true;
this.tableLayoutPanel2.SetColumnSpan(this.chkEnabled, 2);
this.chkEnabled.Location = new System.Drawing.Point(3, 55);
this.chkEnabled.Location = new System.Drawing.Point(3, 58);
this.chkEnabled.Name = "chkEnabled";
this.chkEnabled.Size = new System.Drawing.Size(96, 17);
this.chkEnabled.TabIndex = 6;
this.chkEnabled.Text = "Cheat Enabled";
this.chkEnabled.UseVisualStyleBackColor = true;
//
// txtGameName
//
this.txtGameName.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtGameName.Location = new System.Drawing.Point(78, 3);
this.txtGameName.Name = "txtGameName";
this.txtGameName.ReadOnly = true;
this.txtGameName.Size = new System.Drawing.Size(237, 20);
this.txtGameName.TabIndex = 0;
//
// frmCheat
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(385, 294);
this.Controls.Add(this.tableLayoutPanel2);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(401, 332);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(401, 332);
this.Name = "frmCheat";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
@ -379,8 +375,6 @@
this.tlpCustom.PerformLayout();
this.flowLayoutPanel2.ResumeLayout(false);
this.flowLayoutPanel2.PerformLayout();
this.flowLayoutPanel3.ResumeLayout(false);
this.flowLayoutPanel3.PerformLayout();
this.ResumeLayout(false);
}
@ -407,7 +401,6 @@
private System.Windows.Forms.RadioButton radAbsoluteAddress;
private System.Windows.Forms.TextBox txtValue;
private System.Windows.Forms.TextBox txtCompare;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3;
private System.Windows.Forms.TextBox txtGameName;
private System.Windows.Forms.Button btnBrowse;
private System.Windows.Forms.CheckBox chkEnabled;

View File

@ -67,7 +67,7 @@ namespace Mesen.GUI.Forms.Cheats
private void btnBrowse_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "All supported formats (*.nes, *.zip)|*.NES;*.ZIP|NES Roms (*.nes)|*.NES|ZIP Archives (*.zip)|*.ZIP";
ofd.Filter = ResourceHelper.GetMessage("FilterRom");
if(ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
_gameHash = MD5Helper.GetMD5Hash(ofd.FileName);
if(_gameHash != null) {

View File

@ -117,4 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -34,17 +34,21 @@ namespace Mesen.GUI.Forms.Cheats
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.chkCurrentGameOnly = new System.Windows.Forms.CheckBox();
this.lstCheats = new Mesen.GUI.Controls.MyListView();
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colGameName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colCheatName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.colCode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.contextMenuCheats = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mnuAddCheat = new System.Windows.Forms.ToolStripMenuItem();
this.mnuDeleteCheat = new System.Windows.Forms.ToolStripMenuItem();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.btnAddCheat = new System.Windows.Forms.Button();
this.btnDeleteCheat = new System.Windows.Forms.Button();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.tabMain.SuspendLayout();
this.tabCheats.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.contextMenuCheats.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.SuspendLayout();
//
@ -81,11 +85,13 @@ namespace Mesen.GUI.Forms.Cheats
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.chkCurrentGameOnly, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.lstCheats, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.lstCheats, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(429, 194);
@ -107,36 +113,40 @@ namespace Mesen.GUI.Forms.Cheats
//
this.lstCheats.CheckBoxes = true;
this.lstCheats.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2,
this.columnHeader3});
this.colGameName,
this.colCheatName,
this.colCode});
this.tableLayoutPanel1.SetColumnSpan(this.lstCheats, 2);
this.lstCheats.ContextMenuStrip = this.contextMenuCheats;
this.lstCheats.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstCheats.FullRowSelect = true;
this.lstCheats.Location = new System.Drawing.Point(3, 26);
this.lstCheats.Location = new System.Drawing.Point(3, 55);
this.lstCheats.Name = "lstCheats";
this.lstCheats.Size = new System.Drawing.Size(423, 165);
this.lstCheats.Size = new System.Drawing.Size(423, 136);
this.lstCheats.TabIndex = 1;
this.lstCheats.UseCompatibleStateImageBehavior = false;
this.lstCheats.View = System.Windows.Forms.View.Details;
this.lstCheats.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.lstCheats_ItemChecked);
this.lstCheats.SelectedIndexChanged += new System.EventHandler(this.lstCheats_SelectedIndexChanged);
this.lstCheats.DoubleClick += new System.EventHandler(this.lstCheats_DoubleClick);
//
// columnHeader1
// colGameName
//
this.columnHeader1.Text = "Game";
this.columnHeader1.Width = 98;
this.colGameName.Name = "colGameName";
this.colGameName.Text = "Game";
this.colGameName.Width = 98;
//
// columnHeader2
// colCheatName
//
this.columnHeader2.Text = "Cheat Name";
this.columnHeader2.Width = 110;
this.colCheatName.Name = "colCheatName";
this.colCheatName.Text = "Cheat Name";
this.colCheatName.Width = 110;
//
// columnHeader3
// colCode
//
this.columnHeader3.Text = "Code";
this.columnHeader3.Width = 142;
this.colCode.Name = "colCode";
this.colCode.Text = "Code";
this.colCode.Width = 142;
//
// contextMenuCheats
//
@ -156,11 +166,46 @@ namespace Mesen.GUI.Forms.Cheats
//
// mnuDeleteCheat
//
this.mnuDeleteCheat.Enabled = false;
this.mnuDeleteCheat.Name = "mnuDeleteCheat";
this.mnuDeleteCheat.ShortcutKeys = System.Windows.Forms.Keys.Delete;
this.mnuDeleteCheat.Size = new System.Drawing.Size(159, 22);
this.mnuDeleteCheat.Text = "Delete";
//
// flowLayoutPanel2
//
this.tableLayoutPanel1.SetColumnSpan(this.flowLayoutPanel2, 2);
this.flowLayoutPanel2.Controls.Add(this.btnAddCheat);
this.flowLayoutPanel2.Controls.Add(this.btnDeleteCheat);
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 23);
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(429, 29);
this.flowLayoutPanel2.TabIndex = 3;
//
// btnAddCheat
//
this.btnAddCheat.AutoSize = true;
this.btnAddCheat.Location = new System.Drawing.Point(3, 3);
this.btnAddCheat.Name = "btnAddCheat";
this.btnAddCheat.Size = new System.Drawing.Size(75, 23);
this.btnAddCheat.TabIndex = 2;
this.btnAddCheat.Text = "Add Cheat";
this.btnAddCheat.UseVisualStyleBackColor = true;
this.btnAddCheat.Click += new System.EventHandler(this.mnuAddCheat_Click);
//
// btnDeleteCheat
//
this.btnDeleteCheat.AutoSize = true;
this.btnDeleteCheat.Enabled = false;
this.btnDeleteCheat.Location = new System.Drawing.Point(84, 3);
this.btnDeleteCheat.Name = "btnDeleteCheat";
this.btnDeleteCheat.Size = new System.Drawing.Size(129, 23);
this.btnDeleteCheat.TabIndex = 3;
this.btnDeleteCheat.Text = "Delete Selected Cheats";
this.btnDeleteCheat.UseVisualStyleBackColor = true;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 1;
@ -191,6 +236,8 @@ namespace Mesen.GUI.Forms.Cheats
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.contextMenuCheats.ResumeLayout(false);
this.flowLayoutPanel2.ResumeLayout(false);
this.flowLayoutPanel2.PerformLayout();
this.tableLayoutPanel2.ResumeLayout(false);
this.ResumeLayout(false);
@ -203,12 +250,15 @@ namespace Mesen.GUI.Forms.Cheats
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.CheckBox chkCurrentGameOnly;
private MyListView lstCheats;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ColumnHeader columnHeader2;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.ColumnHeader colGameName;
private System.Windows.Forms.ColumnHeader colCheatName;
private System.Windows.Forms.ColumnHeader colCode;
private System.Windows.Forms.ContextMenuStrip contextMenuCheats;
private System.Windows.Forms.ToolStripMenuItem mnuAddCheat;
private System.Windows.Forms.ToolStripMenuItem mnuDeleteCheat;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.Button btnAddCheat;
private System.Windows.Forms.Button btnDeleteCheat;
}
}

View File

@ -80,5 +80,12 @@ namespace Mesen.GUI.Forms.Cheats
{
UpdateCheatList();
}
private void lstCheats_SelectedIndexChanged(object sender, EventArgs e)
{
bool enableDelete = lstCheats.SelectedItems.Count > 0;
mnuDeleteCheat.Enabled = enableDelete;
btnDeleteCheat.Enabled = enableDelete;
}
}
}

View File

@ -119,7 +119,7 @@
// trkDmcVol
//
this.trkDmcVol.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkDmcVol.Caption = "DMC";
this.trkDmcVol.Text = "DMC";
this.trkDmcVol.Location = new System.Drawing.Point(384, 0);
this.trkDmcVol.Margin = new System.Windows.Forms.Padding(0);
this.trkDmcVol.Maximum = 100;
@ -133,7 +133,7 @@
// trkNoiseVol
//
this.trkNoiseVol.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkNoiseVol.Caption = "Noise";
this.trkNoiseVol.Text = "Noise";
this.trkNoiseVol.Location = new System.Drawing.Point(306, 0);
this.trkNoiseVol.Margin = new System.Windows.Forms.Padding(0);
this.trkNoiseVol.Maximum = 100;
@ -147,7 +147,7 @@
// trkTriangleVol
//
this.trkTriangleVol.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkTriangleVol.Caption = "Triangle";
this.trkTriangleVol.Text = "Triangle";
this.trkTriangleVol.Location = new System.Drawing.Point(231, 0);
this.trkTriangleVol.Margin = new System.Windows.Forms.Padding(0);
this.trkTriangleVol.Maximum = 100;
@ -161,7 +161,7 @@
// trkSquare2Vol
//
this.trkSquare2Vol.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkSquare2Vol.Caption = "Square 2";
this.trkSquare2Vol.Text = "Square 2";
this.trkSquare2Vol.Location = new System.Drawing.Point(156, 0);
this.trkSquare2Vol.Margin = new System.Windows.Forms.Padding(0);
this.trkSquare2Vol.Maximum = 100;
@ -175,7 +175,7 @@
// trkSquare1Vol
//
this.trkSquare1Vol.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkSquare1Vol.Caption = "Square 1";
this.trkSquare1Vol.Text = "Square 1";
this.trkSquare1Vol.Location = new System.Drawing.Point(81, 0);
this.trkSquare1Vol.Margin = new System.Windows.Forms.Padding(0);
this.trkSquare1Vol.Maximum = 100;
@ -189,7 +189,7 @@
// trkMaster
//
this.trkMaster.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkMaster.Caption = "Master";
this.trkMaster.Text = "Master";
this.trkMaster.Location = new System.Drawing.Point(6, 0);
this.trkMaster.Margin = new System.Windows.Forms.Padding(0);
this.trkMaster.Maximum = 100;
@ -203,7 +203,7 @@
// trkFdsVol
//
this.trkFdsVol.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkFdsVol.Caption = "FDS";
this.trkFdsVol.Text = "FDS";
this.trkFdsVol.Location = new System.Drawing.Point(6, 160);
this.trkFdsVol.Margin = new System.Windows.Forms.Padding(0);
this.trkFdsVol.Maximum = 100;
@ -217,7 +217,7 @@
// trkMmc5Vol
//
this.trkMmc5Vol.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkMmc5Vol.Caption = "MMC5";
this.trkMmc5Vol.Text = "MMC5";
this.trkMmc5Vol.Enabled = false;
this.trkMmc5Vol.Location = new System.Drawing.Point(81, 160);
this.trkMmc5Vol.Margin = new System.Windows.Forms.Padding(0);
@ -232,7 +232,7 @@
// trkVrc6Vol
//
this.trkVrc6Vol.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkVrc6Vol.Caption = "VRC6";
this.trkVrc6Vol.Text = "VRC6";
this.trkVrc6Vol.Enabled = false;
this.trkVrc6Vol.Location = new System.Drawing.Point(156, 160);
this.trkVrc6Vol.Margin = new System.Windows.Forms.Padding(0);
@ -247,7 +247,7 @@
// trkVrc7Vol
//
this.trkVrc7Vol.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkVrc7Vol.Caption = "VRC7";
this.trkVrc7Vol.Text = "VRC7";
this.trkVrc7Vol.Enabled = false;
this.trkVrc7Vol.Location = new System.Drawing.Point(231, 160);
this.trkVrc7Vol.Margin = new System.Windows.Forms.Padding(0);
@ -262,7 +262,7 @@
// trkNamco163Vol
//
this.trkNamco163Vol.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkNamco163Vol.Caption = "Namco";
this.trkNamco163Vol.Text = "Namco";
this.trkNamco163Vol.Enabled = false;
this.trkNamco163Vol.Location = new System.Drawing.Point(306, 160);
this.trkNamco163Vol.Margin = new System.Windows.Forms.Padding(0);
@ -277,7 +277,7 @@
// trkSunsoft5b
//
this.trkSunsoft5b.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.trkSunsoft5b.Caption = "Sunsoft";
this.trkSunsoft5b.Text = "Sunsoft";
this.trkSunsoft5b.Enabled = false;
this.trkSunsoft5b.Location = new System.Drawing.Point(384, 160);
this.trkSunsoft5b.Margin = new System.Windows.Forms.Padding(0);

View File

@ -156,6 +156,7 @@
//
// btnClear
//
this.btnClear.AutoSize = true;
this.btnClear.Location = new System.Drawing.Point(118, 3);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(109, 23);
@ -166,6 +167,7 @@
//
// btnReset
//
this.btnReset.AutoSize = true;
this.btnReset.Location = new System.Drawing.Point(3, 3);
this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(109, 23);
@ -238,12 +240,13 @@
//
// lblTurboFast
//
this.lblTurboFast.AutoSize = true;
this.lblTurboFast.Location = new System.Drawing.Point(90, 0);
this.lblTurboFast.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblTurboFast.Location = new System.Drawing.Point(70, 0);
this.lblTurboFast.Name = "lblTurboFast";
this.lblTurboFast.Size = new System.Drawing.Size(27, 13);
this.lblTurboFast.Size = new System.Drawing.Size(47, 15);
this.lblTurboFast.TabIndex = 1;
this.lblTurboFast.Text = "Fast";
this.lblTurboFast.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// lblSlow
//
@ -272,6 +275,7 @@
this.tpgSet3.ResumeLayout(false);
this.tpgSet4.ResumeLayout(false);
this.flowLayoutPanel2.ResumeLayout(false);
this.flowLayoutPanel2.PerformLayout();
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.trkTurboSpeed)).EndInit();

View File

@ -56,7 +56,7 @@
// baseConfigPanel
//
this.baseConfigPanel.Location = new System.Drawing.Point(0, 224);
this.baseConfigPanel.Size = new System.Drawing.Size(348, 29);
this.baseConfigPanel.Size = new System.Drawing.Size(349, 29);
//
// tabMain
//
@ -66,7 +66,7 @@
this.tabMain.Location = new System.Drawing.Point(0, 0);
this.tabMain.Name = "tabMain";
this.tabMain.SelectedIndex = 0;
this.tabMain.Size = new System.Drawing.Size(348, 253);
this.tabMain.Size = new System.Drawing.Size(349, 253);
this.tabMain.TabIndex = 11;
//
// tpgControllers
@ -74,7 +74,7 @@
this.tpgControllers.Controls.Add(this.tableLayoutPanel1);
this.tpgControllers.Location = new System.Drawing.Point(4, 22);
this.tpgControllers.Name = "tpgControllers";
this.tpgControllers.Size = new System.Drawing.Size(340, 227);
this.tpgControllers.Size = new System.Drawing.Size(341, 227);
this.tpgControllers.TabIndex = 0;
this.tpgControllers.Text = "Controllers";
this.tpgControllers.UseVisualStyleBackColor = true;
@ -83,7 +83,7 @@
//
this.tableLayoutPanel1.ColumnCount = 3;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.Controls.Add(this.btnSetupP4, 2, 7);
this.tableLayoutPanel1.Controls.Add(this.btnSetupP3, 2, 6);
@ -115,14 +115,15 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(340, 227);
this.tableLayoutPanel1.Size = new System.Drawing.Size(341, 227);
this.tableLayoutPanel1.TabIndex = 0;
//
// btnSetupP4
//
this.btnSetupP4.Location = new System.Drawing.Point(279, 171);
this.btnSetupP4.AutoSize = true;
this.btnSetupP4.Location = new System.Drawing.Point(282, 177);
this.btnSetupP4.Name = "btnSetupP4";
this.btnSetupP4.Size = new System.Drawing.Size(56, 21);
this.btnSetupP4.Size = new System.Drawing.Size(56, 23);
this.btnSetupP4.TabIndex = 12;
this.btnSetupP4.Text = "Setup";
this.btnSetupP4.UseVisualStyleBackColor = true;
@ -130,9 +131,10 @@
//
// btnSetupP3
//
this.btnSetupP3.Location = new System.Drawing.Point(279, 144);
this.btnSetupP3.AutoSize = true;
this.btnSetupP3.Location = new System.Drawing.Point(282, 148);
this.btnSetupP3.Name = "btnSetupP3";
this.btnSetupP3.Size = new System.Drawing.Size(56, 21);
this.btnSetupP3.Size = new System.Drawing.Size(56, 23);
this.btnSetupP3.TabIndex = 11;
this.btnSetupP3.Text = "Setup";
this.btnSetupP3.UseVisualStyleBackColor = true;
@ -142,7 +144,7 @@
//
this.lblPlayer1.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblPlayer1.AutoSize = true;
this.lblPlayer1.Location = new System.Drawing.Point(3, 44);
this.lblPlayer1.Location = new System.Drawing.Point(3, 45);
this.lblPlayer1.Name = "lblPlayer1";
this.lblPlayer1.Size = new System.Drawing.Size(48, 13);
this.lblPlayer1.TabIndex = 0;
@ -152,7 +154,7 @@
//
this.lblPlayer2.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblPlayer2.AutoSize = true;
this.lblPlayer2.Location = new System.Drawing.Point(3, 71);
this.lblPlayer2.Location = new System.Drawing.Point(3, 74);
this.lblPlayer2.Name = "lblPlayer2";
this.lblPlayer2.Size = new System.Drawing.Size(48, 13);
this.lblPlayer2.TabIndex = 1;
@ -160,31 +162,34 @@
//
// cboPlayer4
//
this.cboPlayer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.cboPlayer4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboPlayer4.FormattingEnabled = true;
this.cboPlayer4.Location = new System.Drawing.Point(90, 171);
this.cboPlayer4.Location = new System.Drawing.Point(90, 177);
this.cboPlayer4.Name = "cboPlayer4";
this.cboPlayer4.Size = new System.Drawing.Size(183, 21);
this.cboPlayer4.Size = new System.Drawing.Size(186, 21);
this.cboPlayer4.TabIndex = 8;
this.cboPlayer4.SelectedIndexChanged += new System.EventHandler(this.cboPlayerController_SelectedIndexChanged);
//
// cboPlayer3
//
this.cboPlayer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.cboPlayer3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboPlayer3.FormattingEnabled = true;
this.cboPlayer3.Location = new System.Drawing.Point(90, 144);
this.cboPlayer3.Location = new System.Drawing.Point(90, 148);
this.cboPlayer3.Name = "cboPlayer3";
this.cboPlayer3.Size = new System.Drawing.Size(183, 21);
this.cboPlayer3.Size = new System.Drawing.Size(186, 21);
this.cboPlayer3.TabIndex = 7;
this.cboPlayer3.SelectedIndexChanged += new System.EventHandler(this.cboPlayerController_SelectedIndexChanged);
//
// cboPlayer1
//
this.cboPlayer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.cboPlayer1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboPlayer1.FormattingEnabled = true;
this.cboPlayer1.Location = new System.Drawing.Point(90, 40);
this.cboPlayer1.Name = "cboPlayer1";
this.cboPlayer1.Size = new System.Drawing.Size(183, 21);
this.cboPlayer1.Size = new System.Drawing.Size(186, 21);
this.cboPlayer1.TabIndex = 4;
this.cboPlayer1.SelectedIndexChanged += new System.EventHandler(this.cboPlayerController_SelectedIndexChanged);
//
@ -192,7 +197,7 @@
//
this.lblPlayer4.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblPlayer4.AutoSize = true;
this.lblPlayer4.Location = new System.Drawing.Point(3, 175);
this.lblPlayer4.Location = new System.Drawing.Point(3, 182);
this.lblPlayer4.Name = "lblPlayer4";
this.lblPlayer4.Size = new System.Drawing.Size(48, 13);
this.lblPlayer4.TabIndex = 3;
@ -200,11 +205,12 @@
//
// cboPlayer2
//
this.cboPlayer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.cboPlayer2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboPlayer2.FormattingEnabled = true;
this.cboPlayer2.Location = new System.Drawing.Point(90, 67);
this.cboPlayer2.Location = new System.Drawing.Point(90, 69);
this.cboPlayer2.Name = "cboPlayer2";
this.cboPlayer2.Size = new System.Drawing.Size(183, 21);
this.cboPlayer2.Size = new System.Drawing.Size(186, 21);
this.cboPlayer2.TabIndex = 6;
this.cboPlayer2.SelectedIndexChanged += new System.EventHandler(this.cboPlayerController_SelectedIndexChanged);
//
@ -212,7 +218,7 @@
//
this.lblPlayer3.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblPlayer3.AutoSize = true;
this.lblPlayer3.Location = new System.Drawing.Point(3, 148);
this.lblPlayer3.Location = new System.Drawing.Point(3, 153);
this.lblPlayer3.Name = "lblPlayer3";
this.lblPlayer3.Size = new System.Drawing.Size(48, 13);
this.lblPlayer3.TabIndex = 2;
@ -220,9 +226,10 @@
//
// btnSetupP1
//
this.btnSetupP1.Location = new System.Drawing.Point(279, 40);
this.btnSetupP1.AutoSize = true;
this.btnSetupP1.Location = new System.Drawing.Point(282, 40);
this.btnSetupP1.Name = "btnSetupP1";
this.btnSetupP1.Size = new System.Drawing.Size(56, 21);
this.btnSetupP1.Size = new System.Drawing.Size(56, 23);
this.btnSetupP1.TabIndex = 9;
this.btnSetupP1.Text = "Setup";
this.btnSetupP1.UseVisualStyleBackColor = true;
@ -230,9 +237,10 @@
//
// btnSetupP2
//
this.btnSetupP2.Location = new System.Drawing.Point(279, 67);
this.btnSetupP2.AutoSize = true;
this.btnSetupP2.Location = new System.Drawing.Point(282, 69);
this.btnSetupP2.Name = "btnSetupP2";
this.btnSetupP2.Size = new System.Drawing.Size(56, 21);
this.btnSetupP2.Size = new System.Drawing.Size(56, 23);
this.btnSetupP2.TabIndex = 10;
this.btnSetupP2.Text = "Setup";
this.btnSetupP2.UseVisualStyleBackColor = true;
@ -265,7 +273,7 @@
//
this.lblExpansionPort.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblExpansionPort.AutoSize = true;
this.lblExpansionPort.Location = new System.Drawing.Point(3, 121);
this.lblExpansionPort.Location = new System.Drawing.Point(3, 125);
this.lblExpansionPort.Name = "lblExpansionPort";
this.lblExpansionPort.Size = new System.Drawing.Size(81, 13);
this.lblExpansionPort.TabIndex = 16;
@ -273,11 +281,12 @@
//
// cboExpansionPort
//
this.cboExpansionPort.Dock = System.Windows.Forms.DockStyle.Fill;
this.cboExpansionPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cboExpansionPort.FormattingEnabled = true;
this.cboExpansionPort.Location = new System.Drawing.Point(90, 117);
this.cboExpansionPort.Location = new System.Drawing.Point(90, 121);
this.cboExpansionPort.Name = "cboExpansionPort";
this.cboExpansionPort.Size = new System.Drawing.Size(183, 21);
this.cboExpansionPort.Size = new System.Drawing.Size(186, 21);
this.cboExpansionPort.TabIndex = 17;
this.cboExpansionPort.SelectedIndexChanged += new System.EventHandler(this.cboExpansionPort_SelectedIndexChanged);
//
@ -286,7 +295,7 @@
this.chkFourScore.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.chkFourScore.AutoSize = true;
this.tableLayoutPanel1.SetColumnSpan(this.chkFourScore, 2);
this.chkFourScore.Location = new System.Drawing.Point(3, 94);
this.chkFourScore.Location = new System.Drawing.Point(3, 98);
this.chkFourScore.Name = "chkFourScore";
this.chkFourScore.Size = new System.Drawing.Size(151, 17);
this.chkFourScore.TabIndex = 15;
@ -298,7 +307,7 @@
//
this.tpgEmulatorKeys.Location = new System.Drawing.Point(4, 22);
this.tpgEmulatorKeys.Name = "tpgEmulatorKeys";
this.tpgEmulatorKeys.Size = new System.Drawing.Size(340, 227);
this.tpgEmulatorKeys.Size = new System.Drawing.Size(341, 227);
this.tpgEmulatorKeys.TabIndex = 4;
this.tpgEmulatorKeys.Text = "Emulator Keys";
this.tpgEmulatorKeys.UseVisualStyleBackColor = true;
@ -307,7 +316,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(348, 253);
this.ClientSize = new System.Drawing.Size(349, 253);
this.Controls.Add(this.tabMain);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;

View File

@ -31,10 +31,10 @@ namespace Mesen.GUI.Forms.Config
this.UpdateInterface();
InputInfo inputInfo = (InputInfo)Entity;
cboPlayer1.SelectedItem = inputInfo.Controllers[0].ControllerType.ToString();
cboPlayer2.SelectedItem = inputInfo.Controllers[1].ControllerType.ToString();
cboPlayer3.SelectedItem = inputInfo.Controllers[2].ControllerType.ToString();
cboPlayer4.SelectedItem = inputInfo.Controllers[3].ControllerType.ToString();
cboPlayer1.SelectedItem = ResourceHelper.GetEnumText(inputInfo.Controllers[0].ControllerType);
cboPlayer2.SelectedItem = ResourceHelper.GetEnumText(inputInfo.Controllers[1].ControllerType);
cboPlayer3.SelectedItem = ResourceHelper.GetEnumText(inputInfo.Controllers[2].ControllerType);
cboPlayer4.SelectedItem = ResourceHelper.GetEnumText(inputInfo.Controllers[3].ControllerType);
}
private void UpdateAvailableControllerTypes()
@ -58,9 +58,9 @@ namespace Mesen.GUI.Forms.Config
{
object currentSelection = comboBox.SelectedItem;
comboBox.Items.Clear();
comboBox.Items.Add(InteropEmu.ControllerType.None.ToString());
comboBox.Items.Add(ResourceHelper.GetEnumText(InteropEmu.ControllerType.None));
foreach(InteropEmu.ControllerType type in controllerTypes) {
comboBox.Items.Add(type.ToString());
comboBox.Items.Add(ResourceHelper.GetEnumText(type));
}
comboBox.SelectedItem = currentSelection;
@ -125,7 +125,7 @@ namespace Mesen.GUI.Forms.Config
private void cboPlayerController_SelectedIndexChanged(object sender, EventArgs e)
{
bool enableButton = (((ComboBox)sender).SelectedItem.Equals(InteropEmu.ControllerType.StandardController.ToString()));
bool enableButton = (((ComboBox)sender).SelectedItem.Equals(ResourceHelper.GetEnumText(InteropEmu.ControllerType.StandardController)));
if(sender == cboPlayer1) {
btnSetupP1.Enabled = enableButton;
} else if(sender == cboPlayer2) {

View File

@ -28,14 +28,18 @@
private void InitializeComponent()
{
this.tlpMain = new System.Windows.Forms.TableLayoutPanel();
this.chkSingleInstance = new System.Windows.Forms.CheckBox();
this.chkAutomaticallyCheckForUpdates = new System.Windows.Forms.CheckBox();
this.chkPauseOnMovieEnd = new System.Windows.Forms.CheckBox();
this.chkAllowBackgroundInput = new System.Windows.Forms.CheckBox();
this.chkPauseWhenInBackground = new System.Windows.Forms.CheckBox();
this.chkAutoLoadIps = new System.Windows.Forms.CheckBox();
this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel();
this.chkSingleInstance = new System.Windows.Forms.CheckBox();
this.chkDisableScreensaver = new System.Windows.Forms.CheckBox();
this.btnOpenMesenFolder = new System.Windows.Forms.Button();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.lblDisplayLanguage = new System.Windows.Forms.Label();
this.cboDisplayLanguage = new System.Windows.Forms.ComboBox();
this.tabMain = new System.Windows.Forms.TabControl();
this.tpgGeneral = new System.Windows.Forms.TabPage();
this.tpgFileAssociations = new System.Windows.Forms.TabPage();
@ -52,8 +56,8 @@
this.chkRemoveSpriteLimit = new System.Windows.Forms.CheckBox();
this.chkFdsAutoLoadDisk = new System.Windows.Forms.CheckBox();
this.chkFdsFastForwardOnLoad = new System.Windows.Forms.CheckBox();
this.chkAutomaticallyCheckForUpdates = new System.Windows.Forms.CheckBox();
this.tlpMain.SuspendLayout();
this.flowLayoutPanel2.SuspendLayout();
this.tabMain.SuspendLayout();
this.tpgGeneral.SuspendLayout();
this.tpgFileAssociations.SuspendLayout();
@ -65,26 +69,28 @@
//
// baseConfigPanel
//
this.baseConfigPanel.Location = new System.Drawing.Point(0, 239);
this.baseConfigPanel.Size = new System.Drawing.Size(394, 29);
this.baseConfigPanel.Location = new System.Drawing.Point(0, 270);
this.baseConfigPanel.Size = new System.Drawing.Size(458, 29);
//
// tlpMain
//
this.tlpMain.ColumnCount = 1;
this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tlpMain.Controls.Add(this.chkSingleInstance, 0, 1);
this.tlpMain.Controls.Add(this.chkAutomaticallyCheckForUpdates, 0, 0);
this.tlpMain.Controls.Add(this.chkPauseOnMovieEnd, 0, 5);
this.tlpMain.Controls.Add(this.chkAllowBackgroundInput, 0, 4);
this.tlpMain.Controls.Add(this.chkPauseWhenInBackground, 0, 3);
this.tlpMain.Controls.Add(this.chkAutoLoadIps, 0, 2);
this.tlpMain.Controls.Add(this.flowLayoutPanel6, 0, 0);
this.tlpMain.Controls.Add(this.chkDisableScreensaver, 0, 6);
this.tlpMain.Controls.Add(this.btnOpenMesenFolder, 0, 8);
this.tlpMain.Controls.Add(this.chkSingleInstance, 0, 2);
this.tlpMain.Controls.Add(this.chkAutomaticallyCheckForUpdates, 0, 1);
this.tlpMain.Controls.Add(this.chkPauseOnMovieEnd, 0, 6);
this.tlpMain.Controls.Add(this.chkAllowBackgroundInput, 0, 5);
this.tlpMain.Controls.Add(this.chkPauseWhenInBackground, 0, 4);
this.tlpMain.Controls.Add(this.chkAutoLoadIps, 0, 3);
this.tlpMain.Controls.Add(this.flowLayoutPanel6, 0, 1);
this.tlpMain.Controls.Add(this.chkDisableScreensaver, 0, 7);
this.tlpMain.Controls.Add(this.btnOpenMesenFolder, 0, 9);
this.tlpMain.Controls.Add(this.flowLayoutPanel2, 0, 0);
this.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.tlpMain.Location = new System.Drawing.Point(3, 3);
this.tlpMain.Name = "tlpMain";
this.tlpMain.RowCount = 9;
this.tlpMain.RowCount = 10;
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
@ -94,13 +100,33 @@
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpMain.Size = new System.Drawing.Size(380, 207);
this.tlpMain.Size = new System.Drawing.Size(444, 238);
this.tlpMain.TabIndex = 1;
//
// chkSingleInstance
//
this.chkSingleInstance.AutoSize = true;
this.chkSingleInstance.Location = new System.Drawing.Point(3, 52);
this.chkSingleInstance.Name = "chkSingleInstance";
this.chkSingleInstance.Size = new System.Drawing.Size(228, 17);
this.chkSingleInstance.TabIndex = 11;
this.chkSingleInstance.Text = "Only allow one instance of Mesen at a time";
this.chkSingleInstance.UseVisualStyleBackColor = true;
//
// chkAutomaticallyCheckForUpdates
//
this.chkAutomaticallyCheckForUpdates.AutoSize = true;
this.chkAutomaticallyCheckForUpdates.Location = new System.Drawing.Point(3, 29);
this.chkAutomaticallyCheckForUpdates.Name = "chkAutomaticallyCheckForUpdates";
this.chkAutomaticallyCheckForUpdates.Size = new System.Drawing.Size(177, 17);
this.chkAutomaticallyCheckForUpdates.TabIndex = 17;
this.chkAutomaticallyCheckForUpdates.Text = "Automatically check for updates";
this.chkAutomaticallyCheckForUpdates.UseVisualStyleBackColor = true;
//
// chkPauseOnMovieEnd
//
this.chkPauseOnMovieEnd.AutoSize = true;
this.chkPauseOnMovieEnd.Location = new System.Drawing.Point(3, 118);
this.chkPauseOnMovieEnd.Location = new System.Drawing.Point(3, 144);
this.chkPauseOnMovieEnd.Name = "chkPauseOnMovieEnd";
this.chkPauseOnMovieEnd.Size = new System.Drawing.Size(199, 17);
this.chkPauseOnMovieEnd.TabIndex = 15;
@ -110,7 +136,7 @@
// chkAllowBackgroundInput
//
this.chkAllowBackgroundInput.AutoSize = true;
this.chkAllowBackgroundInput.Location = new System.Drawing.Point(3, 95);
this.chkAllowBackgroundInput.Location = new System.Drawing.Point(3, 121);
this.chkAllowBackgroundInput.Name = "chkAllowBackgroundInput";
this.chkAllowBackgroundInput.Size = new System.Drawing.Size(177, 17);
this.chkAllowBackgroundInput.TabIndex = 14;
@ -120,7 +146,7 @@
// chkPauseWhenInBackground
//
this.chkPauseWhenInBackground.AutoSize = true;
this.chkPauseWhenInBackground.Location = new System.Drawing.Point(3, 72);
this.chkPauseWhenInBackground.Location = new System.Drawing.Point(3, 98);
this.chkPauseWhenInBackground.Name = "chkPauseWhenInBackground";
this.chkPauseWhenInBackground.Size = new System.Drawing.Size(204, 17);
this.chkPauseWhenInBackground.TabIndex = 13;
@ -131,7 +157,7 @@
// chkAutoLoadIps
//
this.chkAutoLoadIps.AutoSize = true;
this.chkAutoLoadIps.Location = new System.Drawing.Point(3, 49);
this.chkAutoLoadIps.Location = new System.Drawing.Point(3, 75);
this.chkAutoLoadIps.Name = "chkAutoLoadIps";
this.chkAutoLoadIps.Size = new System.Drawing.Size(132, 17);
this.chkAutoLoadIps.TabIndex = 9;
@ -142,27 +168,17 @@
//
this.flowLayoutPanel6.AutoSize = true;
this.flowLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel6.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel6.Location = new System.Drawing.Point(0, 26);
this.flowLayoutPanel6.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel6.Name = "flowLayoutPanel6";
this.flowLayoutPanel6.Size = new System.Drawing.Size(380, 1);
this.flowLayoutPanel6.Size = new System.Drawing.Size(444, 1);
this.flowLayoutPanel6.TabIndex = 10;
//
// chkSingleInstance
//
this.chkSingleInstance.AutoSize = true;
this.chkSingleInstance.Location = new System.Drawing.Point(3, 26);
this.chkSingleInstance.Name = "chkSingleInstance";
this.chkSingleInstance.Size = new System.Drawing.Size(228, 17);
this.chkSingleInstance.TabIndex = 11;
this.chkSingleInstance.Text = "Only allow one instance of Mesen at a time";
this.chkSingleInstance.UseVisualStyleBackColor = true;
//
// chkDisableScreensaver
//
this.chkDisableScreensaver.AutoSize = true;
this.chkDisableScreensaver.Enabled = false;
this.chkDisableScreensaver.Location = new System.Drawing.Point(3, 141);
this.chkDisableScreensaver.Location = new System.Drawing.Point(3, 167);
this.chkDisableScreensaver.Name = "chkDisableScreensaver";
this.chkDisableScreensaver.Size = new System.Drawing.Size(245, 17);
this.chkDisableScreensaver.TabIndex = 11;
@ -171,7 +187,8 @@
//
// btnOpenMesenFolder
//
this.btnOpenMesenFolder.Location = new System.Drawing.Point(3, 181);
this.btnOpenMesenFolder.AutoSize = true;
this.btnOpenMesenFolder.Location = new System.Drawing.Point(3, 212);
this.btnOpenMesenFolder.Name = "btnOpenMesenFolder";
this.btnOpenMesenFolder.Size = new System.Drawing.Size(117, 23);
this.btnOpenMesenFolder.TabIndex = 16;
@ -179,6 +196,35 @@
this.btnOpenMesenFolder.UseVisualStyleBackColor = true;
this.btnOpenMesenFolder.Click += new System.EventHandler(this.btnOpenMesenFolder_Click);
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Controls.Add(this.lblDisplayLanguage);
this.flowLayoutPanel2.Controls.Add(this.cboDisplayLanguage);
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.Size = new System.Drawing.Size(444, 26);
this.flowLayoutPanel2.TabIndex = 18;
//
// lblDisplayLanguage
//
this.lblDisplayLanguage.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblDisplayLanguage.AutoSize = true;
this.lblDisplayLanguage.Location = new System.Drawing.Point(3, 7);
this.lblDisplayLanguage.Name = "lblDisplayLanguage";
this.lblDisplayLanguage.Size = new System.Drawing.Size(95, 13);
this.lblDisplayLanguage.TabIndex = 0;
this.lblDisplayLanguage.Text = "Display Language:";
//
// cboDisplayLanguage
//
this.cboDisplayLanguage.FormattingEnabled = true;
this.cboDisplayLanguage.Location = new System.Drawing.Point(104, 3);
this.cboDisplayLanguage.Name = "cboDisplayLanguage";
this.cboDisplayLanguage.Size = new System.Drawing.Size(206, 21);
this.cboDisplayLanguage.TabIndex = 1;
//
// tabMain
//
this.tabMain.Controls.Add(this.tpgGeneral);
@ -188,7 +234,7 @@
this.tabMain.Location = new System.Drawing.Point(0, 0);
this.tabMain.Name = "tabMain";
this.tabMain.SelectedIndex = 0;
this.tabMain.Size = new System.Drawing.Size(394, 239);
this.tabMain.Size = new System.Drawing.Size(458, 270);
this.tabMain.TabIndex = 2;
//
// tpgGeneral
@ -197,7 +243,7 @@
this.tpgGeneral.Location = new System.Drawing.Point(4, 22);
this.tpgGeneral.Name = "tpgGeneral";
this.tpgGeneral.Padding = new System.Windows.Forms.Padding(3);
this.tpgGeneral.Size = new System.Drawing.Size(386, 213);
this.tpgGeneral.Size = new System.Drawing.Size(450, 244);
this.tpgGeneral.TabIndex = 0;
this.tpgGeneral.Text = "General";
this.tpgGeneral.UseVisualStyleBackColor = true;
@ -208,7 +254,7 @@
this.tpgFileAssociations.Location = new System.Drawing.Point(4, 22);
this.tpgFileAssociations.Name = "tpgFileAssociations";
this.tpgFileAssociations.Padding = new System.Windows.Forms.Padding(3);
this.tpgFileAssociations.Size = new System.Drawing.Size(386, 213);
this.tpgFileAssociations.Size = new System.Drawing.Size(450, 244);
this.tpgFileAssociations.TabIndex = 2;
this.tpgFileAssociations.Text = "File Associations";
this.tpgFileAssociations.UseVisualStyleBackColor = true;
@ -219,7 +265,7 @@
this.grpFileAssociations.Dock = System.Windows.Forms.DockStyle.Fill;
this.grpFileAssociations.Location = new System.Drawing.Point(3, 3);
this.grpFileAssociations.Name = "grpFileAssociations";
this.grpFileAssociations.Size = new System.Drawing.Size(380, 207);
this.grpFileAssociations.Size = new System.Drawing.Size(444, 238);
this.grpFileAssociations.TabIndex = 12;
this.grpFileAssociations.TabStop = false;
this.grpFileAssociations.Text = "File Associations";
@ -241,7 +287,7 @@
this.tlpFileFormat.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tlpFileFormat.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tlpFileFormat.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tlpFileFormat.Size = new System.Drawing.Size(374, 188);
this.tlpFileFormat.Size = new System.Drawing.Size(438, 219);
this.tlpFileFormat.TabIndex = 0;
//
// chkNesFormat
@ -267,7 +313,7 @@
// chkMmoFormat
//
this.chkMmoFormat.AutoSize = true;
this.chkMmoFormat.Location = new System.Drawing.Point(190, 3);
this.chkMmoFormat.Location = new System.Drawing.Point(222, 3);
this.chkMmoFormat.Name = "chkMmoFormat";
this.chkMmoFormat.Size = new System.Drawing.Size(133, 17);
this.chkMmoFormat.TabIndex = 11;
@ -278,7 +324,7 @@
//
this.chkMstFormat.AutoSize = true;
this.chkMstFormat.Enabled = false;
this.chkMstFormat.Location = new System.Drawing.Point(190, 26);
this.chkMstFormat.Location = new System.Drawing.Point(222, 26);
this.chkMstFormat.Name = "chkMstFormat";
this.chkMstFormat.Size = new System.Drawing.Size(144, 17);
this.chkMstFormat.TabIndex = 13;
@ -291,7 +337,7 @@
this.tpgAdvanced.Location = new System.Drawing.Point(4, 22);
this.tpgAdvanced.Name = "tpgAdvanced";
this.tpgAdvanced.Padding = new System.Windows.Forms.Padding(3);
this.tpgAdvanced.Size = new System.Drawing.Size(386, 213);
this.tpgAdvanced.Size = new System.Drawing.Size(450, 244);
this.tpgAdvanced.TabIndex = 1;
this.tpgAdvanced.Text = "Advanced";
this.tpgAdvanced.UseVisualStyleBackColor = true;
@ -315,7 +361,7 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(380, 207);
this.tableLayoutPanel1.Size = new System.Drawing.Size(444, 238);
this.tableLayoutPanel1.TabIndex = 0;
//
// chkUseAlternativeMmc3Irq
@ -368,21 +414,11 @@
this.chkFdsFastForwardOnLoad.Text = "Automatically fast forward FDS games when disk or BIOS is loading";
this.chkFdsFastForwardOnLoad.UseVisualStyleBackColor = true;
//
// chkAutomaticallyCheckForUpdates
//
this.chkAutomaticallyCheckForUpdates.AutoSize = true;
this.chkAutomaticallyCheckForUpdates.Location = new System.Drawing.Point(3, 3);
this.chkAutomaticallyCheckForUpdates.Name = "chkAutomaticallyCheckForUpdates";
this.chkAutomaticallyCheckForUpdates.Size = new System.Drawing.Size(177, 17);
this.chkAutomaticallyCheckForUpdates.TabIndex = 17;
this.chkAutomaticallyCheckForUpdates.Text = "Automatically check for updates";
this.chkAutomaticallyCheckForUpdates.UseVisualStyleBackColor = true;
//
// frmPreferences
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(394, 268);
this.ClientSize = new System.Drawing.Size(458, 299);
this.Controls.Add(this.tabMain);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
@ -394,6 +430,8 @@
this.Controls.SetChildIndex(this.tabMain, 0);
this.tlpMain.ResumeLayout(false);
this.tlpMain.PerformLayout();
this.flowLayoutPanel2.ResumeLayout(false);
this.flowLayoutPanel2.PerformLayout();
this.tabMain.ResumeLayout(false);
this.tpgGeneral.ResumeLayout(false);
this.tpgFileAssociations.ResumeLayout(false);
@ -435,5 +473,8 @@
private System.Windows.Forms.CheckBox chkPauseOnMovieEnd;
private System.Windows.Forms.Button btnOpenMesenFolder;
private System.Windows.Forms.CheckBox chkAutomaticallyCheckForUpdates;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.Label lblDisplayLanguage;
private System.Windows.Forms.ComboBox cboDisplayLanguage;
}
}

View File

@ -19,6 +19,8 @@ namespace Mesen.GUI.Forms.Config
Entity = ConfigManager.Config.PreferenceInfo;
AddBinding("DisplayLanguage", cboDisplayLanguage);
AddBinding("AutomaticallyCheckForUpdates", chkAutomaticallyCheckForUpdates);
AddBinding("SingleInstance", chkSingleInstance);
AddBinding("AutoLoadIpsPatches", chkAutoLoadIps);

View File

@ -250,10 +250,11 @@
this.tlpMain.SetColumnSpan(this.flowLayoutPanel7, 2);
this.flowLayoutPanel7.Controls.Add(this.chkUseHdPacks);
this.flowLayoutPanel7.Controls.Add(this.picHdNesTooltip);
this.flowLayoutPanel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel7.Location = new System.Drawing.Point(0, 80);
this.flowLayoutPanel7.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel7.Name = "flowLayoutPanel7";
this.flowLayoutPanel7.Size = new System.Drawing.Size(166, 23);
this.flowLayoutPanel7.Size = new System.Drawing.Size(501, 23);
this.flowLayoutPanel7.TabIndex = 20;
//
// chkUseHdPacks
@ -562,7 +563,7 @@
//
// btnResetPalette
//
this.btnResetPalette.Location = new System.Drawing.Point(3, 31);
this.btnResetPalette.Location = new System.Drawing.Point(3, 32);
this.btnResetPalette.Name = "btnResetPalette";
this.btnResetPalette.Size = new System.Drawing.Size(106, 22);
this.btnResetPalette.TabIndex = 1;
@ -572,9 +573,10 @@
//
// btnLoadPalFile
//
this.btnLoadPalFile.AutoSize = true;
this.btnLoadPalFile.Location = new System.Drawing.Point(3, 3);
this.btnLoadPalFile.Name = "btnLoadPalFile";
this.btnLoadPalFile.Size = new System.Drawing.Size(106, 22);
this.btnLoadPalFile.Size = new System.Drawing.Size(106, 23);
this.btnLoadPalFile.TabIndex = 0;
this.btnLoadPalFile.Text = "Load Palette File";
this.btnLoadPalFile.UseVisualStyleBackColor = true;
@ -625,6 +627,7 @@
this.tableLayoutPanel3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picPalette)).EndInit();
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
this.ResumeLayout(false);
}

View File

@ -40,7 +40,7 @@ namespace Mesen.GUI.Forms.Config
_paletteData = InteropEmu.GetRgbPalette();
RefreshPalette();
toolTip.SetToolTip(picHdNesTooltip, "This option allows Mesen to load HDNes-format HD packs if they are found." + Environment.NewLine + Environment.NewLine + "HD Packs should be placed in the \"HdPacks\" folder in a subfolder matching the name of the ROM." + Environment.NewLine + "e.g: MyRom.nes should have their HD Pack in \"HdPacks\\MyRom\\hires.txt\"." + Environment.NewLine + Environment.NewLine + "Note: Support for HD Packs is a work in progress and some limitations remain.");
toolTip.SetToolTip(picHdNesTooltip, ResourceHelper.GetMessage("HDNesTooltip"));
UpdateOverscanImage();
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Mesen.GUI.Forms
{
class MesenMsgBox
{
public static DialogResult Show(string text, MessageBoxButtons buttons, MessageBoxIcon icon, params string[] args)
{
return MessageBox.Show(ResourceHelper.GetMessage(text, args), "Mesen", buttons, icon);
}
}
}

View File

@ -100,7 +100,6 @@
this.picAvatar.TabIndex = 8;
this.picAvatar.TabStop = false;
this.picAvatar.Visible = false;
this.picAvatar.Click += new System.EventHandler(this.picAvatar_Click);
//
// frmPlayerProfile
//

View File

@ -18,27 +18,12 @@ namespace Mesen.GUI.Forms.NetPlay
InitializeComponent();
this.txtPlayerName.Text = ConfigManager.Config.Profile.PlayerName;
this.picAvatar.Image = ConfigManager.Config.Profile.GetAvatarImage();
}
private void picAvatar_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "All supported image files (*.bmp, *.jpg, *.png)|*.bmp;*.jpg;*.png";
if(ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
try {
this.picAvatar.Image = Image.FromFile(ofd.FileName).ResizeImage(64, 64);
} catch {
MessageBox.Show("Invalid image format.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
protected override void UpdateConfig()
{
PlayerProfile profile = new PlayerProfile();
profile.PlayerName = this.txtPlayerName.Text;
profile.SetAvatar(this.picAvatar.Image);
ConfigManager.Config.Profile = profile;
}
}

View File

@ -0,0 +1,192 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Windows.Forms.Layout;
using System.Xml;
using Mesen.GUI.Config;
using Mesen.GUI.Controls;
namespace Mesen.GUI.Forms
{
public enum Language
{
SystemDefault = 0,
English = 1,
French = 2,
Japanese = 3
}
class ResourceHelper
{
private static Language _language;
private static XmlDocument _resources = new XmlDocument();
private static XmlDocument _originalEnglishResources = null;
public static void LoadResources(Language language)
{
if(language == Language.SystemDefault) {
switch(System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName) {
default:
case "en": language = Language.English; break;
case "fr": language = Language.French; break;
case "ja": language = Language.Japanese; break;
}
}
string filename;
switch(language) {
default:
case Language.English: filename = "resources.en.xml"; break;
case Language.French: filename = "resources.fr.xml"; break;
case Language.Japanese: filename = "resources.ja.xml"; break;
}
_language = language;
InteropEmu.SetDisplayLanguage(language);
using(Stream stream = ResourceManager.GetZippedResource(filename)) {
_resources.Load(stream);
}
}
public static string GetMessage(string id, params string[] args)
{
var baseNode = _resources.SelectSingleNode("/Resources/Messages/Message[@ID='" + id + "']");
if(baseNode != null) {
return string.Format(baseNode.InnerText, args);
} else {
return "[[" + id + "]]";
}
}
public static string GetEnumText(Enum e)
{
var baseNode = _resources.SelectSingleNode("/Resources/Enums/Enum[@ID='" + e.GetType().Name + "']/Value[@ID='" + e.ToString() + "']");
if(baseNode != null) {
return baseNode.InnerText;
} else {
return e.ToString();
}
}
public static void ApplyResources(Form form)
{
if(form is frmMain && _originalEnglishResources == null) {
_originalEnglishResources = BuildResourceFile(form);
}
XmlNode baseNode = null;
if(form is frmMain && _language == Language.English) {
baseNode = _originalEnglishResources.SelectSingleNode("/Resources/Forms/Form[@ID='" + form.Name + "']");
} else {
baseNode = _resources.SelectSingleNode("/Resources/Forms/Form[@ID='" + form.Name + "']");
}
if(baseNode != null) {
form.Text = baseNode.Attributes["Title"].Value;
ApplyResources(baseNode, form.Controls);
}
}
private static void ApplyResources(XmlNode baseNode, IEnumerable container)
{
foreach(object ctrl in container) {
string name = null;
if(ctrl is Control) {
name = ((Control)ctrl).Name;
} else if(ctrl is ToolStripItem) {
name = ((ToolStripItem)ctrl).Name;
} else if(ctrl is ColumnHeader) {
name = ((ColumnHeader)ctrl).Name;
}
var controlNode = baseNode.SelectSingleNode("Control[@ID='" + name + "']");
if(controlNode != null) {
if(ctrl is Control) {
((Control)ctrl).Text = controlNode.InnerText;
} else if(ctrl is ToolStripItem) {
((ToolStripItem)ctrl).Text = controlNode.InnerText;
} else if(ctrl is ColumnHeader) {
((ColumnHeader)ctrl).Text = controlNode.InnerText;
}
}
if(ctrl is MenuStrip) {
ApplyResources(baseNode, ((MenuStrip)ctrl).Items);
} else if(ctrl is ContextMenuStrip) {
ApplyResources(baseNode, ((ContextMenuStrip)ctrl).Items);
} else if(ctrl is ListView) {
ApplyResources(baseNode, ((ListView)ctrl).Columns);
if(((ListView)ctrl).ContextMenuStrip != null) {
ApplyResources(baseNode, ((ListView)ctrl).ContextMenuStrip.Items);
}
} else if(ctrl is Control) {
ApplyResources(baseNode, ((Control)ctrl).Controls);
} else if(ctrl is ToolStripMenuItem) {
ApplyResources(baseNode, ((ToolStripMenuItem)ctrl).DropDownItems);
}
}
}
private static XmlDocument BuildResourceFile(Form form)
{
XmlDocument document = new XmlDocument();
XmlNode resources = document.CreateElement("Resources");
document.AppendChild(resources);
resources.AppendChild(document.CreateElement("Forms"));
BuildResourceFile(document, form, form.Controls);
return document;
}
private static void BuildResourceFile(XmlDocument xmlDoc, Form form, IEnumerable container)
{
var baseNode = xmlDoc.SelectSingleNode("/Resources/Forms/Form[@ID='" + form.Name + "']");
if(baseNode == null) {
baseNode = xmlDoc.CreateElement("Form");
baseNode.Attributes.Append(xmlDoc.CreateAttribute("ID"));
baseNode.Attributes.Append(xmlDoc.CreateAttribute("Title"));
baseNode.Attributes["ID"].Value = form.Name;
baseNode.Attributes["Title"].Value = form.Text;
xmlDoc.SelectSingleNode("/Resources/Forms").AppendChild(baseNode);
}
foreach(Component ctrl in container) {
string text = null;
string name = null;
if(ctrl is Control) {
text = ((Control)ctrl).Text;
name = ((Control)ctrl).Name;
} else if(ctrl is ToolStripItem) {
text = ((ToolStripItem)ctrl).Text;
name = ((ToolStripItem)ctrl).Name;
}
if(!string.IsNullOrWhiteSpace(text)) {
var controlNode = baseNode.SelectSingleNode("Control[@ID='" + name + "']");
if(controlNode == null) {
controlNode = xmlDoc.CreateElement("Control");
controlNode.Attributes.Append(xmlDoc.CreateAttribute("ID"));
controlNode.Attributes["ID"].Value = name;
baseNode.AppendChild(controlNode);
}
controlNode.InnerText = text;
}
if(ctrl is MenuStrip) {
BuildResourceFile(xmlDoc, form, ((MenuStrip)ctrl).Items);
} else if(ctrl is Control) {
BuildResourceFile(xmlDoc, form, ((Control)ctrl).Controls);
} else if(ctrl is ToolStripMenuItem) {
BuildResourceFile(xmlDoc, form, ((ToolStripMenuItem)ctrl).DropDownItems);
}
}
}
}
}

View File

@ -54,7 +54,7 @@ namespace Mesen.GUI.Forms
if(!args.Cancelled && args.Error == null && File.Exists(_filename)) {
result = System.Windows.Forms.DialogResult.OK;
} else if(args.Error != null) {
MessageBox.Show("Unable to download file. Check your internet connection and try again." + Environment.NewLine + Environment.NewLine + "Details:" + Environment.NewLine + args.Error.Message, "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("UnableToDownload", MessageBoxButtons.OK, MessageBoxIcon.Error, args.Error.ToString());
result = System.Windows.Forms.DialogResult.Cancel;
}
};
@ -63,7 +63,7 @@ namespace Mesen.GUI.Forms
try {
downloadTask = client.DownloadFileTaskAsync(_link, _filename);
} catch(Exception ex) {
MessageBox.Show("Unable to download file. Check your internet connection and try again." + Environment.NewLine + Environment.NewLine + "Details:" + Environment.NewLine + ex.Message, "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("UnableToDownload", MessageBoxButtons.OK, MessageBoxIcon.Error, ex.ToString());
result = System.Windows.Forms.DialogResult.Cancel;
}

View File

@ -151,9 +151,9 @@ namespace Mesen.GUI.Forms
this.panelRenderer.BackColor = System.Drawing.Color.Black;
this.panelRenderer.Controls.Add(this.ctrlRenderer);
this.panelRenderer.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelRenderer.Location = new System.Drawing.Point(0, 24);
this.panelRenderer.Location = new System.Drawing.Point(0, 26);
this.panelRenderer.Name = "panelRenderer";
this.panelRenderer.Size = new System.Drawing.Size(304, 218);
this.panelRenderer.Size = new System.Drawing.Size(304, 216);
this.panelRenderer.TabIndex = 2;
this.panelRenderer.Click += new System.EventHandler(this.panelRenderer_Click);
//
@ -177,7 +177,7 @@ namespace Mesen.GUI.Forms
this.mnuHelp});
this.menuStrip.Location = new System.Drawing.Point(0, 0);
this.menuStrip.Name = "menuStrip";
this.menuStrip.Size = new System.Drawing.Size(304, 24);
this.menuStrip.Size = new System.Drawing.Size(304, 26);
this.menuStrip.TabIndex = 0;
this.menuStrip.Text = "menuStrip1";
this.menuStrip.MenuActivate += new System.EventHandler(this.menuStrip_MenuActivate);
@ -196,7 +196,8 @@ namespace Mesen.GUI.Forms
this.toolStripMenuItem6,
this.mnuExit});
this.mnuFile.Name = "mnuFile";
this.mnuFile.Size = new System.Drawing.Size(37, 20);
this.mnuFile.ShortcutKeyDisplayString = "";
this.mnuFile.Size = new System.Drawing.Size(40, 22);
this.mnuFile.Text = "File";
//
// mnuOpen
@ -204,50 +205,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(154, 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(151, 6);
//
// mnuSaveState
//
this.mnuSaveState.Name = "mnuSaveState";
this.mnuSaveState.Size = new System.Drawing.Size(146, 22);
this.mnuSaveState.Size = new System.Drawing.Size(154, 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(154, 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(151, 6);
//
// mnuRecentFiles
//
this.mnuRecentFiles.Name = "mnuRecentFiles";
this.mnuRecentFiles.Size = new System.Drawing.Size(146, 22);
this.mnuRecentFiles.Size = new System.Drawing.Size(154, 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(151, 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(154, 22);
this.mnuExit.Text = "Exit";
this.mnuExit.Click += new System.EventHandler(this.mnuExit_Click);
//
@ -262,7 +263,7 @@ namespace Mesen.GUI.Forms
this.mnuSelectDisk,
this.mnuEjectDisk});
this.mnuGame.Name = "mnuGame";
this.mnuGame.Size = new System.Drawing.Size(50, 20);
this.mnuGame.Size = new System.Drawing.Size(55, 22);
this.mnuGame.Text = "Game";
//
// mnuPause
@ -271,7 +272,7 @@ namespace Mesen.GUI.Forms
this.mnuPause.Image = global::Mesen.GUI.Properties.Resources.Pause;
this.mnuPause.Name = "mnuPause";
this.mnuPause.ShortcutKeyDisplayString = "Esc";
this.mnuPause.Size = new System.Drawing.Size(200, 22);
this.mnuPause.Size = new System.Drawing.Size(220, 22);
this.mnuPause.Text = "Pause";
this.mnuPause.Click += new System.EventHandler(this.mnuPause_Click);
//
@ -280,7 +281,7 @@ namespace Mesen.GUI.Forms
this.mnuReset.Enabled = false;
this.mnuReset.Image = global::Mesen.GUI.Properties.Resources.Reset;
this.mnuReset.Name = "mnuReset";
this.mnuReset.Size = new System.Drawing.Size(200, 22);
this.mnuReset.Size = new System.Drawing.Size(220, 22);
this.mnuReset.Text = "Reset";
this.mnuReset.Click += new System.EventHandler(this.mnuReset_Click);
//
@ -289,20 +290,20 @@ namespace Mesen.GUI.Forms
this.mnuStop.Enabled = false;
this.mnuStop.Image = global::Mesen.GUI.Properties.Resources.Stop;
this.mnuStop.Name = "mnuStop";
this.mnuStop.Size = new System.Drawing.Size(200, 22);
this.mnuStop.Size = new System.Drawing.Size(220, 22);
this.mnuStop.Text = "Stop";
this.mnuStop.Click += new System.EventHandler(this.mnuStop_Click);
//
// sepFdsDisk
//
this.sepFdsDisk.Name = "sepFdsDisk";
this.sepFdsDisk.Size = new System.Drawing.Size(197, 6);
this.sepFdsDisk.Size = new System.Drawing.Size(217, 6);
//
// mnuSwitchDiskSide
//
this.mnuSwitchDiskSide.Name = "mnuSwitchDiskSide";
this.mnuSwitchDiskSide.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.B)));
this.mnuSwitchDiskSide.Size = new System.Drawing.Size(200, 22);
this.mnuSwitchDiskSide.Size = new System.Drawing.Size(220, 22);
this.mnuSwitchDiskSide.Text = "Switch Disk Side";
this.mnuSwitchDiskSide.Click += new System.EventHandler(this.mnuSwitchDiskSide_Click);
//
@ -310,14 +311,14 @@ namespace Mesen.GUI.Forms
//
this.mnuSelectDisk.Image = global::Mesen.GUI.Properties.Resources.Floppy;
this.mnuSelectDisk.Name = "mnuSelectDisk";
this.mnuSelectDisk.Size = new System.Drawing.Size(200, 22);
this.mnuSelectDisk.Size = new System.Drawing.Size(220, 22);
this.mnuSelectDisk.Text = "Select Disk";
//
// mnuEjectDisk
//
this.mnuEjectDisk.Image = global::Mesen.GUI.Properties.Resources.Eject;
this.mnuEjectDisk.Name = "mnuEjectDisk";
this.mnuEjectDisk.Size = new System.Drawing.Size(200, 22);
this.mnuEjectDisk.Size = new System.Drawing.Size(220, 22);
this.mnuEjectDisk.Text = "Eject Disk";
this.mnuEjectDisk.Click += new System.EventHandler(this.mnuEjectDisk_Click);
//
@ -335,7 +336,7 @@ namespace Mesen.GUI.Forms
this.toolStripMenuItem11,
this.mnuPreferences});
this.mnuOptions.Name = "mnuOptions";
this.mnuOptions.Size = new System.Drawing.Size(61, 20);
this.mnuOptions.Size = new System.Drawing.Size(64, 22);
this.mnuOptions.Text = "Options";
//
// mnuEmulationSpeed
@ -355,26 +356,26 @@ 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(144, 22);
this.mnuEmulationSpeed.Text = "Speed";
//
// mnuEmuSpeedNormal
//
this.mnuEmuSpeedNormal.Name = "mnuEmuSpeedNormal";
this.mnuEmuSpeedNormal.Size = new System.Drawing.Size(182, 22);
this.mnuEmuSpeedNormal.Size = new System.Drawing.Size(196, 22);
this.mnuEmuSpeedNormal.Text = "Normal (100%)";
this.mnuEmuSpeedNormal.Click += new System.EventHandler(this.mnuEmulationSpeedOption_Click);
//
// toolStripMenuItem8
//
this.toolStripMenuItem8.Name = "toolStripMenuItem8";
this.toolStripMenuItem8.Size = new System.Drawing.Size(179, 6);
this.toolStripMenuItem8.Size = new System.Drawing.Size(193, 6);
//
// mnuIncreaseSpeed
//
this.mnuIncreaseSpeed.Name = "mnuIncreaseSpeed";
this.mnuIncreaseSpeed.ShortcutKeyDisplayString = "=";
this.mnuIncreaseSpeed.Size = new System.Drawing.Size(182, 22);
this.mnuIncreaseSpeed.Size = new System.Drawing.Size(196, 22);
this.mnuIncreaseSpeed.Text = "Increase Speed";
this.mnuIncreaseSpeed.Click += new System.EventHandler(this.mnuIncreaseSpeed_Click);
//
@ -382,7 +383,7 @@ namespace Mesen.GUI.Forms
//
this.mnuDecreaseSpeed.Name = "mnuDecreaseSpeed";
this.mnuDecreaseSpeed.ShortcutKeyDisplayString = "-";
this.mnuDecreaseSpeed.Size = new System.Drawing.Size(182, 22);
this.mnuDecreaseSpeed.Size = new System.Drawing.Size(196, 22);
this.mnuDecreaseSpeed.Text = "Decrease Speed";
this.mnuDecreaseSpeed.Click += new System.EventHandler(this.mnuDecreaseSpeed_Click);
//
@ -390,19 +391,19 @@ namespace Mesen.GUI.Forms
//
this.mnuEmuSpeedMaximumSpeed.Name = "mnuEmuSpeedMaximumSpeed";
this.mnuEmuSpeedMaximumSpeed.ShortcutKeys = System.Windows.Forms.Keys.F9;
this.mnuEmuSpeedMaximumSpeed.Size = new System.Drawing.Size(182, 22);
this.mnuEmuSpeedMaximumSpeed.Size = new System.Drawing.Size(196, 22);
this.mnuEmuSpeedMaximumSpeed.Text = "Maximum Speed";
this.mnuEmuSpeedMaximumSpeed.Click += new System.EventHandler(this.mnuEmuSpeedMaximumSpeed_Click);
//
// toolStripMenuItem9
//
this.toolStripMenuItem9.Name = "toolStripMenuItem9";
this.toolStripMenuItem9.Size = new System.Drawing.Size(179, 6);
this.toolStripMenuItem9.Size = new System.Drawing.Size(193, 6);
//
// mnuEmuSpeedTriple
//
this.mnuEmuSpeedTriple.Name = "mnuEmuSpeedTriple";
this.mnuEmuSpeedTriple.Size = new System.Drawing.Size(182, 22);
this.mnuEmuSpeedTriple.Size = new System.Drawing.Size(196, 22);
this.mnuEmuSpeedTriple.Tag = "";
this.mnuEmuSpeedTriple.Text = "Triple (300%)";
this.mnuEmuSpeedTriple.Click += new System.EventHandler(this.mnuEmulationSpeedOption_Click);
@ -410,35 +411,35 @@ namespace Mesen.GUI.Forms
// mnuEmuSpeedDouble
//
this.mnuEmuSpeedDouble.Name = "mnuEmuSpeedDouble";
this.mnuEmuSpeedDouble.Size = new System.Drawing.Size(182, 22);
this.mnuEmuSpeedDouble.Size = new System.Drawing.Size(196, 22);
this.mnuEmuSpeedDouble.Text = "Double (200%)";
this.mnuEmuSpeedDouble.Click += new System.EventHandler(this.mnuEmulationSpeedOption_Click);
//
// mnuEmuSpeedHalf
//
this.mnuEmuSpeedHalf.Name = "mnuEmuSpeedHalf";
this.mnuEmuSpeedHalf.Size = new System.Drawing.Size(182, 22);
this.mnuEmuSpeedHalf.Size = new System.Drawing.Size(196, 22);
this.mnuEmuSpeedHalf.Text = "Half (50%)";
this.mnuEmuSpeedHalf.Click += new System.EventHandler(this.mnuEmulationSpeedOption_Click);
//
// mnuEmuSpeedQuarter
//
this.mnuEmuSpeedQuarter.Name = "mnuEmuSpeedQuarter";
this.mnuEmuSpeedQuarter.Size = new System.Drawing.Size(182, 22);
this.mnuEmuSpeedQuarter.Size = new System.Drawing.Size(196, 22);
this.mnuEmuSpeedQuarter.Text = "Quarter (25%)";
this.mnuEmuSpeedQuarter.Click += new System.EventHandler(this.mnuEmulationSpeedOption_Click);
//
// toolStripMenuItem14
//
this.toolStripMenuItem14.Name = "toolStripMenuItem14";
this.toolStripMenuItem14.Size = new System.Drawing.Size(179, 6);
this.toolStripMenuItem14.Size = new System.Drawing.Size(193, 6);
//
// mnuShowFPS
//
this.mnuShowFPS.CheckOnClick = true;
this.mnuShowFPS.Name = "mnuShowFPS";
this.mnuShowFPS.ShortcutKeys = System.Windows.Forms.Keys.F10;
this.mnuShowFPS.Size = new System.Drawing.Size(182, 22);
this.mnuShowFPS.Size = new System.Drawing.Size(196, 22);
this.mnuShowFPS.Text = "Show FPS";
this.mnuShowFPS.Click += new System.EventHandler(this.mnuShowFPS_Click);
//
@ -454,13 +455,13 @@ 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(144, 22);
this.mnuVideoScale.Text = "Video Size";
//
// mnuScale1x
//
this.mnuScale1x.Name = "mnuScale1x";
this.mnuScale1x.Size = new System.Drawing.Size(152, 22);
this.mnuScale1x.Size = new System.Drawing.Size(163, 22);
this.mnuScale1x.Tag = "1";
this.mnuScale1x.Text = "1x";
this.mnuScale1x.Click += new System.EventHandler(this.mnuScale_Click);
@ -468,7 +469,7 @@ namespace Mesen.GUI.Forms
// mnuScale2x
//
this.mnuScale2x.Name = "mnuScale2x";
this.mnuScale2x.Size = new System.Drawing.Size(152, 22);
this.mnuScale2x.Size = new System.Drawing.Size(163, 22);
this.mnuScale2x.Tag = "2";
this.mnuScale2x.Text = "2x";
this.mnuScale2x.Click += new System.EventHandler(this.mnuScale_Click);
@ -476,7 +477,7 @@ namespace Mesen.GUI.Forms
// mnuScale3x
//
this.mnuScale3x.Name = "mnuScale3x";
this.mnuScale3x.Size = new System.Drawing.Size(152, 22);
this.mnuScale3x.Size = new System.Drawing.Size(163, 22);
this.mnuScale3x.Tag = "3";
this.mnuScale3x.Text = "3x";
this.mnuScale3x.Click += new System.EventHandler(this.mnuScale_Click);
@ -484,7 +485,7 @@ namespace Mesen.GUI.Forms
// mnuScale4x
//
this.mnuScale4x.Name = "mnuScale4x";
this.mnuScale4x.Size = new System.Drawing.Size(152, 22);
this.mnuScale4x.Size = new System.Drawing.Size(163, 22);
this.mnuScale4x.Tag = "4";
this.mnuScale4x.Text = "4x";
this.mnuScale4x.Click += new System.EventHandler(this.mnuScale_Click);
@ -492,20 +493,20 @@ namespace Mesen.GUI.Forms
// mnuScaleCustom
//
this.mnuScaleCustom.Name = "mnuScaleCustom";
this.mnuScaleCustom.Size = new System.Drawing.Size(152, 22);
this.mnuScaleCustom.Size = new System.Drawing.Size(163, 22);
this.mnuScaleCustom.Text = "Custom";
this.mnuScaleCustom.Click += new System.EventHandler(this.mnuScaleCustom_Click);
//
// toolStripMenuItem13
//
this.toolStripMenuItem13.Name = "toolStripMenuItem13";
this.toolStripMenuItem13.Size = new System.Drawing.Size(149, 6);
this.toolStripMenuItem13.Size = new System.Drawing.Size(160, 6);
//
// mnuFullscreen
//
this.mnuFullscreen.Name = "mnuFullscreen";
this.mnuFullscreen.ShortcutKeys = System.Windows.Forms.Keys.F11;
this.mnuFullscreen.Size = new System.Drawing.Size(152, 22);
this.mnuFullscreen.Size = new System.Drawing.Size(163, 22);
this.mnuFullscreen.Text = "Fullscreen";
this.mnuFullscreen.Click += new System.EventHandler(this.mnuFullscreen_Click);
//
@ -515,33 +516,33 @@ namespace Mesen.GUI.Forms
this.mnuNoneFilter,
this.mnuNtscFilter});
this.mnuVideoFilter.Name = "mnuVideoFilter";
this.mnuVideoFilter.Size = new System.Drawing.Size(135, 22);
this.mnuVideoFilter.Size = new System.Drawing.Size(144, 22);
this.mnuVideoFilter.Text = "Video Filter";
//
// mnuNoneFilter
//
this.mnuNoneFilter.Name = "mnuNoneFilter";
this.mnuNoneFilter.Size = new System.Drawing.Size(104, 22);
this.mnuNoneFilter.Size = new System.Drawing.Size(109, 22);
this.mnuNoneFilter.Text = "None";
this.mnuNoneFilter.Click += new System.EventHandler(this.mnuNoneFilter_Click);
//
// mnuNtscFilter
//
this.mnuNtscFilter.Name = "mnuNtscFilter";
this.mnuNtscFilter.Size = new System.Drawing.Size(104, 22);
this.mnuNtscFilter.Size = new System.Drawing.Size(109, 22);
this.mnuNtscFilter.Text = "NTSC";
this.mnuNtscFilter.Click += new System.EventHandler(this.mnuNtscFilter_Click);
//
// toolStripMenuItem10
//
this.toolStripMenuItem10.Name = "toolStripMenuItem10";
this.toolStripMenuItem10.Size = new System.Drawing.Size(132, 6);
this.toolStripMenuItem10.Size = new System.Drawing.Size(141, 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(144, 22);
this.mnuAudioConfig.Text = "Audio";
this.mnuAudioConfig.Click += new System.EventHandler(this.mnuAudioConfig_Click);
//
@ -549,7 +550,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(144, 22);
this.mnuInput.Text = "Input";
this.mnuInput.Click += new System.EventHandler(this.mnuInput_Click);
//
@ -562,34 +563,34 @@ 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(144, 22);
this.mnuRegion.Text = "Region";
//
// mnuRegionAuto
//
this.mnuRegionAuto.Name = "mnuRegionAuto";
this.mnuRegionAuto.Size = new System.Drawing.Size(108, 22);
this.mnuRegionAuto.Size = new System.Drawing.Size(113, 22);
this.mnuRegionAuto.Text = "Auto";
this.mnuRegionAuto.Click += new System.EventHandler(this.mnuRegion_Click);
//
// mnuRegionNtsc
//
this.mnuRegionNtsc.Name = "mnuRegionNtsc";
this.mnuRegionNtsc.Size = new System.Drawing.Size(108, 22);
this.mnuRegionNtsc.Size = new System.Drawing.Size(113, 22);
this.mnuRegionNtsc.Text = "NTSC";
this.mnuRegionNtsc.Click += new System.EventHandler(this.mnuRegion_Click);
//
// mnuRegionPal
//
this.mnuRegionPal.Name = "mnuRegionPal";
this.mnuRegionPal.Size = new System.Drawing.Size(108, 22);
this.mnuRegionPal.Size = new System.Drawing.Size(113, 22);
this.mnuRegionPal.Text = "PAL";
this.mnuRegionPal.Click += new System.EventHandler(this.mnuRegion_Click);
//
// mnuRegionDendy
//
this.mnuRegionDendy.Name = "mnuRegionDendy";
this.mnuRegionDendy.Size = new System.Drawing.Size(108, 22);
this.mnuRegionDendy.Size = new System.Drawing.Size(113, 22);
this.mnuRegionDendy.Text = "Dendy";
this.mnuRegionDendy.Click += new System.EventHandler(this.mnuRegion_Click);
//
@ -597,20 +598,20 @@ 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(144, 22);
this.mnuVideoConfig.Text = "Video";
this.mnuVideoConfig.Click += new System.EventHandler(this.mnuVideoConfig_Click);
//
// toolStripMenuItem11
//
this.toolStripMenuItem11.Name = "toolStripMenuItem11";
this.toolStripMenuItem11.Size = new System.Drawing.Size(132, 6);
this.toolStripMenuItem11.Size = new System.Drawing.Size(141, 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(144, 22);
this.mnuPreferences.Text = "Preferences";
this.mnuPreferences.Click += new System.EventHandler(this.mnuPreferences_Click);
//
@ -626,7 +627,7 @@ namespace Mesen.GUI.Forms
this.toolStripMenuItem1,
this.mnuTakeScreenshot});
this.mnuTools.Name = "mnuTools";
this.mnuTools.Size = new System.Drawing.Size(48, 20);
this.mnuTools.Size = new System.Drawing.Size(50, 22);
this.mnuTools.Text = "Tools";
//
// mnuNetPlay
@ -640,20 +641,20 @@ 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(202, 22);
this.mnuNetPlay.Text = "Net Play";
//
// mnuStartServer
//
this.mnuStartServer.Name = "mnuStartServer";
this.mnuStartServer.Size = new System.Drawing.Size(177, 22);
this.mnuStartServer.Size = new System.Drawing.Size(190, 22);
this.mnuStartServer.Text = "Start Server";
this.mnuStartServer.Click += new System.EventHandler(this.mnuStartServer_Click);
//
// mnuConnect
//
this.mnuConnect.Name = "mnuConnect";
this.mnuConnect.Size = new System.Drawing.Size(177, 22);
this.mnuConnect.Size = new System.Drawing.Size(190, 22);
this.mnuConnect.Text = "Connect to Server";
this.mnuConnect.Click += new System.EventHandler(this.mnuConnect_Click);
//
@ -667,66 +668,66 @@ namespace Mesen.GUI.Forms
this.toolStripMenuItem3,
this.mnuNetPlaySpectator});
this.mnuNetPlaySelectController.Name = "mnuNetPlaySelectController";
this.mnuNetPlaySelectController.Size = new System.Drawing.Size(177, 22);
this.mnuNetPlaySelectController.Size = new System.Drawing.Size(190, 22);
this.mnuNetPlaySelectController.Text = "Select Controller";
//
// mnuNetPlayPlayer1
//
this.mnuNetPlayPlayer1.Name = "mnuNetPlayPlayer1";
this.mnuNetPlayPlayer1.Size = new System.Drawing.Size(124, 22);
this.mnuNetPlayPlayer1.Size = new System.Drawing.Size(133, 22);
this.mnuNetPlayPlayer1.Text = "Player 1";
this.mnuNetPlayPlayer1.Click += new System.EventHandler(this.mnuNetPlayPlayer1_Click);
//
// mnuNetPlayPlayer2
//
this.mnuNetPlayPlayer2.Name = "mnuNetPlayPlayer2";
this.mnuNetPlayPlayer2.Size = new System.Drawing.Size(124, 22);
this.mnuNetPlayPlayer2.Size = new System.Drawing.Size(133, 22);
this.mnuNetPlayPlayer2.Text = "Player 2";
this.mnuNetPlayPlayer2.Click += new System.EventHandler(this.mnuNetPlayPlayer2_Click);
//
// mnuNetPlayPlayer3
//
this.mnuNetPlayPlayer3.Name = "mnuNetPlayPlayer3";
this.mnuNetPlayPlayer3.Size = new System.Drawing.Size(124, 22);
this.mnuNetPlayPlayer3.Size = new System.Drawing.Size(133, 22);
this.mnuNetPlayPlayer3.Text = "Player 3";
this.mnuNetPlayPlayer3.Click += new System.EventHandler(this.mnuNetPlayPlayer3_Click);
//
// mnuNetPlayPlayer4
//
this.mnuNetPlayPlayer4.Name = "mnuNetPlayPlayer4";
this.mnuNetPlayPlayer4.Size = new System.Drawing.Size(124, 22);
this.mnuNetPlayPlayer4.Size = new System.Drawing.Size(133, 22);
this.mnuNetPlayPlayer4.Text = "Player 4";
this.mnuNetPlayPlayer4.Click += new System.EventHandler(this.mnuNetPlayPlayer4_Click);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(121, 6);
this.toolStripMenuItem3.Size = new System.Drawing.Size(130, 6);
//
// mnuNetPlaySpectator
//
this.mnuNetPlaySpectator.Name = "mnuNetPlaySpectator";
this.mnuNetPlaySpectator.Size = new System.Drawing.Size(124, 22);
this.mnuNetPlaySpectator.Size = new System.Drawing.Size(133, 22);
this.mnuNetPlaySpectator.Text = "Spectator";
this.mnuNetPlaySpectator.Click += new System.EventHandler(this.mnuNetPlaySpectator_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(174, 6);
this.toolStripMenuItem2.Size = new System.Drawing.Size(187, 6);
//
// mnuFindServer
//
this.mnuFindServer.Enabled = false;
this.mnuFindServer.Name = "mnuFindServer";
this.mnuFindServer.Size = new System.Drawing.Size(177, 22);
this.mnuFindServer.Size = new System.Drawing.Size(190, 22);
this.mnuFindServer.Text = "Find Public Server...";
this.mnuFindServer.Visible = false;
//
// mnuProfile
//
this.mnuProfile.Name = "mnuProfile";
this.mnuProfile.Size = new System.Drawing.Size(177, 22);
this.mnuProfile.Size = new System.Drawing.Size(190, 22);
this.mnuProfile.Text = "Configure Profile";
this.mnuProfile.Click += new System.EventHandler(this.mnuProfile_Click);
//
@ -738,13 +739,13 @@ 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(202, 22);
this.mnuMovies.Text = "Movies";
//
// mnuPlayMovie
//
this.mnuPlayMovie.Name = "mnuPlayMovie";
this.mnuPlayMovie.Size = new System.Drawing.Size(149, 22);
this.mnuPlayMovie.Size = new System.Drawing.Size(160, 22);
this.mnuPlayMovie.Text = "Play...";
this.mnuPlayMovie.Click += new System.EventHandler(this.mnuPlayMovie_Click);
//
@ -754,41 +755,41 @@ namespace Mesen.GUI.Forms
this.mnuRecordFromStart,
this.mnuRecordFromNow});
this.mnuRecordFrom.Name = "mnuRecordFrom";
this.mnuRecordFrom.Size = new System.Drawing.Size(149, 22);
this.mnuRecordFrom.Size = new System.Drawing.Size(160, 22);
this.mnuRecordFrom.Text = "Record from...";
//
// mnuRecordFromStart
//
this.mnuRecordFromStart.Name = "mnuRecordFromStart";
this.mnuRecordFromStart.Size = new System.Drawing.Size(99, 22);
this.mnuRecordFromStart.Size = new System.Drawing.Size(106, 22);
this.mnuRecordFromStart.Text = "Start";
this.mnuRecordFromStart.Click += new System.EventHandler(this.mnuRecordFromStart_Click);
//
// mnuRecordFromNow
//
this.mnuRecordFromNow.Name = "mnuRecordFromNow";
this.mnuRecordFromNow.Size = new System.Drawing.Size(99, 22);
this.mnuRecordFromNow.Size = new System.Drawing.Size(106, 22);
this.mnuRecordFromNow.Text = "Now";
this.mnuRecordFromNow.Click += new System.EventHandler(this.mnuRecordFromNow_Click);
//
// mnuStopMovie
//
this.mnuStopMovie.Name = "mnuStopMovie";
this.mnuStopMovie.Size = new System.Drawing.Size(149, 22);
this.mnuStopMovie.Size = new System.Drawing.Size(160, 22);
this.mnuStopMovie.Text = "Stop";
this.mnuStopMovie.Click += new System.EventHandler(this.mnuStopMovie_Click);
//
// mnuCheats
//
this.mnuCheats.Name = "mnuCheats";
this.mnuCheats.Size = new System.Drawing.Size(185, 22);
this.mnuCheats.Size = new System.Drawing.Size(202, 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(199, 6);
//
// mnuTests
//
@ -798,13 +799,13 @@ namespace Mesen.GUI.Forms
this.mnuTestStopRecording,
this.mnuRunAllTests});
this.mnuTests.Name = "mnuTests";
this.mnuTests.Size = new System.Drawing.Size(185, 22);
this.mnuTests.Size = new System.Drawing.Size(202, 22);
this.mnuTests.Text = "Tests";
//
// mnuTestRun
//
this.mnuTestRun.Name = "mnuTestRun";
this.mnuTestRun.Size = new System.Drawing.Size(193, 22);
this.mnuTestRun.Size = new System.Drawing.Size(208, 22);
this.mnuTestRun.Text = "Run...";
this.mnuTestRun.Click += new System.EventHandler(this.mnuTestRun_Click);
//
@ -816,35 +817,35 @@ namespace Mesen.GUI.Forms
this.mnuTestRecordMovie,
this.mnuTestRecordTest});
this.mnuTestRecordFrom.Name = "mnuTestRecordFrom";
this.mnuTestRecordFrom.Size = new System.Drawing.Size(193, 22);
this.mnuTestRecordFrom.Size = new System.Drawing.Size(208, 22);
this.mnuTestRecordFrom.Text = "Record from...";
//
// mnuTestRecordStart
//
this.mnuTestRecordStart.Name = "mnuTestRecordStart";
this.mnuTestRecordStart.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E)));
this.mnuTestRecordStart.Size = new System.Drawing.Size(138, 22);
this.mnuTestRecordStart.Size = new System.Drawing.Size(152, 22);
this.mnuTestRecordStart.Text = "Start";
this.mnuTestRecordStart.Click += new System.EventHandler(this.mnuTestRecordStart_Click);
//
// mnuTestRecordNow
//
this.mnuTestRecordNow.Name = "mnuTestRecordNow";
this.mnuTestRecordNow.Size = new System.Drawing.Size(138, 22);
this.mnuTestRecordNow.Size = new System.Drawing.Size(152, 22);
this.mnuTestRecordNow.Text = "Now";
this.mnuTestRecordNow.Click += new System.EventHandler(this.mnuTestRecordNow_Click);
//
// mnuTestRecordMovie
//
this.mnuTestRecordMovie.Name = "mnuTestRecordMovie";
this.mnuTestRecordMovie.Size = new System.Drawing.Size(138, 22);
this.mnuTestRecordMovie.Size = new System.Drawing.Size(152, 22);
this.mnuTestRecordMovie.Text = "Movie";
this.mnuTestRecordMovie.Click += new System.EventHandler(this.mnuTestRecordMovie_Click);
//
// mnuTestRecordTest
//
this.mnuTestRecordTest.Name = "mnuTestRecordTest";
this.mnuTestRecordTest.Size = new System.Drawing.Size(138, 22);
this.mnuTestRecordTest.Size = new System.Drawing.Size(152, 22);
this.mnuTestRecordTest.Text = "Test";
this.mnuTestRecordTest.Click += new System.EventHandler(this.mnuTestRecordTest_Click);
//
@ -852,35 +853,35 @@ namespace Mesen.GUI.Forms
//
this.mnuTestStopRecording.Name = "mnuTestStopRecording";
this.mnuTestStopRecording.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R)));
this.mnuTestStopRecording.Size = new System.Drawing.Size(193, 22);
this.mnuTestStopRecording.Size = new System.Drawing.Size(208, 22);
this.mnuTestStopRecording.Text = "Stop recording";
this.mnuTestStopRecording.Click += new System.EventHandler(this.mnuTestStopRecording_Click);
//
// mnuRunAllTests
//
this.mnuRunAllTests.Name = "mnuRunAllTests";
this.mnuRunAllTests.Size = new System.Drawing.Size(193, 22);
this.mnuRunAllTests.Size = new System.Drawing.Size(208, 22);
this.mnuRunAllTests.Text = "Run all tests";
this.mnuRunAllTests.Click += new System.EventHandler(this.mnuRunAllTests_Click);
//
// mnuDebugger
//
this.mnuDebugger.Name = "mnuDebugger";
this.mnuDebugger.Size = new System.Drawing.Size(185, 22);
this.mnuDebugger.Size = new System.Drawing.Size(202, 22);
this.mnuDebugger.Text = "Debugger";
this.mnuDebugger.Click += new System.EventHandler(this.mnuDebugger_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(182, 6);
this.toolStripMenuItem1.Size = new System.Drawing.Size(199, 6);
//
// 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(202, 22);
this.mnuTakeScreenshot.Text = "Take Screenshot";
this.mnuTakeScreenshot.Click += new System.EventHandler(this.mnuTakeScreenshot_Click);
//
@ -891,27 +892,27 @@ namespace Mesen.GUI.Forms
this.toolStripMenuItem5,
this.mnuAbout});
this.mnuHelp.Name = "mnuHelp";
this.mnuHelp.Size = new System.Drawing.Size(44, 20);
this.mnuHelp.Size = new System.Drawing.Size(46, 22);
this.mnuHelp.Text = "Help";
//
// mnuCheckForUpdates
//
this.mnuCheckForUpdates.Image = global::Mesen.GUI.Properties.Resources.SoftwareUpdate;
this.mnuCheckForUpdates.Name = "mnuCheckForUpdates";
this.mnuCheckForUpdates.Size = new System.Drawing.Size(170, 22);
this.mnuCheckForUpdates.Size = new System.Drawing.Size(181, 22);
this.mnuCheckForUpdates.Text = "Check for updates";
this.mnuCheckForUpdates.Click += new System.EventHandler(this.mnuCheckForUpdates_Click);
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(167, 6);
this.toolStripMenuItem5.Size = new System.Drawing.Size(178, 6);
//
// mnuAbout
//
this.mnuAbout.Image = global::Mesen.GUI.Properties.Resources.Help;
this.mnuAbout.Name = "mnuAbout";
this.mnuAbout.Size = new System.Drawing.Size(170, 22);
this.mnuAbout.Size = new System.Drawing.Size(181, 22);
this.mnuAbout.Text = "About";
this.mnuAbout.Click += new System.EventHandler(this.mnuAbout_Click);
//

View File

@ -36,6 +36,8 @@ namespace Mesen.GUI.Forms
_romToLoad = args[0];
}
ResourceHelper.LoadResources(ConfigManager.Config.PreferenceInfo.DisplayLanguage);
InitializeComponent();
}
@ -95,7 +97,7 @@ namespace Mesen.GUI.Forms
ConfigManager.Config.MesenVersion = InteropEmu.GetMesenVersion();
ConfigManager.ApplyChanges();
MessageBox.Show("Upgrade completed successfully.", "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Information);
MesenMsgBox.Show("UpgradeSuccess", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
@ -138,9 +140,9 @@ namespace Mesen.GUI.Forms
private void SetEmulationSpeed(uint emulationSpeed)
{
if(emulationSpeed == 0) {
InteropEmu.DisplayMessage("Emulation Speed", "Maximum speed");
InteropEmu.DisplayMessage("EmulationSpeed", "EmulationMaximumSpeed");
} else {
InteropEmu.DisplayMessage("Emulation Speed", emulationSpeed + "%");
InteropEmu.DisplayMessage("EmulationSpeed", "EmulationSpeedPercent", emulationSpeed.ToString());
}
ConfigManager.Config.VideoInfo.EmulationSpeed = emulationSpeed;
ConfigManager.ApplyChanges();
@ -298,7 +300,7 @@ namespace Mesen.GUI.Forms
private void mnuOpen_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "All supported formats (*.nes, *.zip, *.fds, *.ips)|*.NES;*.ZIP;*.IPS;*.FDS|NES Roms (*.nes)|*.NES|Famicom Disk System Roms (*.fds)|*.FDS|ZIP Archives (*.zip)|*.ZIP|IPS Patches (*.ips)|*.IPS|All (*.*)|*.*";
ofd.Filter = ResourceHelper.GetMessage("FilterRomIps");
if(ConfigManager.Config.RecentFiles.Count > 0) {
ofd.InitialDirectory = Path.GetDirectoryName(ConfigManager.Config.RecentFiles[0]);
}
@ -337,9 +339,9 @@ namespace Mesen.GUI.Forms
InteropEmu.ApplyIpsPatch(ipsFile);
} else {
if(_emuThread == null) {
if(MessageBox.Show("Please select a ROM matching the IPS patch file.", string.Empty, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK) {
if(MesenMsgBox.Show("SelectRomIps", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK) {
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "All supported formats (*.nes, *.zip, *.fds)|*.NES;*.ZIP;*.FDS|NES Roms (*.nes)|*.NES|Famicom Disk System Roms (*.fds)|*.FDS|ZIP Archives (*.zip)|*.ZIP|All (*.*)|*.*";
ofd.Filter = ResourceHelper.GetMessage("FilterRom");
if(ConfigManager.Config.RecentFiles.Count > 0) {
ofd.InitialDirectory = Path.GetDirectoryName(ConfigManager.Config.RecentFiles[0]);
}
@ -348,7 +350,7 @@ namespace Mesen.GUI.Forms
}
InteropEmu.ApplyIpsPatch(ipsFile);
}
} else if(MessageBox.Show("Patch and reset the current game?", string.Empty, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK) {
} else if(MesenMsgBox.Show("PatchAndReset", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK) {
InteropEmu.ApplyIpsPatch(ipsFile);
}
}
@ -367,7 +369,7 @@ namespace Mesen.GUI.Forms
InteropEmu.ApplyIpsPatch(ipsFile);
}
} else {
MessageBox.Show("File not found.", "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("FileNotFound", MessageBoxButtons.OK, MessageBoxIcon.Error, filename);
}
}
@ -404,7 +406,7 @@ namespace Mesen.GUI.Forms
bool isNetPlayClient = InteropEmu.IsConnected();
mnuSaveState.Enabled = mnuLoadState.Enabled = mnuPause.Enabled = mnuStop.Enabled = mnuReset.Enabled = (_emuThread != null && !isNetPlayClient);
mnuPause.Text = InteropEmu.IsPaused() ? "Resume" : "Pause";
mnuPause.Text = InteropEmu.IsPaused() ? ResourceHelper.GetMessage("Resume") : ResourceHelper.GetMessage("Pause");
mnuPause.Image = InteropEmu.IsPaused() ? Mesen.GUI.Properties.Resources.Play : Mesen.GUI.Properties.Resources.Pause;
bool netPlay = InteropEmu.IsServerRunning() || isNetPlayClient;
@ -419,10 +421,10 @@ namespace Mesen.GUI.Forms
mnuNetPlayPlayer2.Enabled = (availableControllers & 0x02) == 0x02;
mnuNetPlayPlayer3.Enabled = (availableControllers & 0x04) == 0x04;
mnuNetPlayPlayer4.Enabled = (availableControllers & 0x08) == 0x08;
mnuNetPlayPlayer1.Text = "Player 1 (" + InteropEmu.NetPlayGetControllerType(0).ToString() + ")";
mnuNetPlayPlayer2.Text = "Player 2 (" + InteropEmu.NetPlayGetControllerType(1).ToString() + ")";
mnuNetPlayPlayer3.Text = "Player 3 (" + InteropEmu.NetPlayGetControllerType(2).ToString() + ")";
mnuNetPlayPlayer4.Text = "Player 4 (" + InteropEmu.NetPlayGetControllerType(3).ToString() + ")";
mnuNetPlayPlayer1.Text = ResourceHelper.GetMessage("PlayerNumber", "1") + " (" + ResourceHelper.GetEnumText(InteropEmu.NetPlayGetControllerType(0)) + ")";
mnuNetPlayPlayer2.Text = ResourceHelper.GetMessage("PlayerNumber", "2") + " (" + ResourceHelper.GetEnumText(InteropEmu.NetPlayGetControllerType(1)) + ")";
mnuNetPlayPlayer3.Text = ResourceHelper.GetMessage("PlayerNumber", "3") + " (" + ResourceHelper.GetEnumText(InteropEmu.NetPlayGetControllerType(2)) + ")";
mnuNetPlayPlayer4.Text = ResourceHelper.GetMessage("PlayerNumber", "4") + " (" + ResourceHelper.GetEnumText(InteropEmu.NetPlayGetControllerType(3)) + ")";
mnuNetPlayPlayer1.Checked = (currentControllerPort == 0);
mnuNetPlayPlayer2.Checked = (currentControllerPort == 1);
@ -433,8 +435,8 @@ namespace Mesen.GUI.Forms
mnuNetPlaySpectator.Enabled = true;
}
mnuStartServer.Text = InteropEmu.IsServerRunning() ? "Stop Server" : "Start Server";
mnuConnect.Text = isNetPlayClient ? "Disconnect" : "Connect to Server";
mnuStartServer.Text = InteropEmu.IsServerRunning() ? ResourceHelper.GetMessage("StopServer") : ResourceHelper.GetMessage("StartServer");
mnuConnect.Text = isNetPlayClient ? ResourceHelper.GetMessage("Disconnect") : ResourceHelper.GetMessage("ConnectToServer");
mnuCheats.Enabled = !isNetPlayClient;
mnuEmulationSpeed.Enabled = !isNetPlayClient;
@ -496,7 +498,7 @@ namespace Mesen.GUI.Forms
InteropEmu.Run();
_emuThread = null;
} catch(Exception ex) {
MessageBox.Show(ex.ToString(), "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("UnexpectedError", MessageBoxButtons.OK, MessageBoxIcon.Error, ex.ToString());
}
});
_emuThread.Start();
@ -563,7 +565,7 @@ namespace Mesen.GUI.Forms
Int64 fileTime = InteropEmu.GetStateInfo(i);
string label;
if(fileTime == 0) {
label = i.ToString() + ". <empty>";
label = i.ToString() + ". " + ResourceHelper.GetMessage("EmptyState");
} else {
DateTime dateTime = DateTime.FromFileTime(fileTime);
label = i.ToString() + ". " + dateTime.ToShortDateString() + " " + dateTime.ToShortTimeString();
@ -685,7 +687,7 @@ namespace Mesen.GUI.Forms
private void RecordMovie(bool resetEmu)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Movie files (*.mmo)|*.mmo|All (*.*)|*.*";
sfd.Filter = ResourceHelper.GetMessage("FilterMovie");
sfd.InitialDirectory = ConfigManager.MovieFolder;
sfd.FileName = Path.GetFileNameWithoutExtension(InteropEmu.GetROMPath()) + ".mmo";
if(sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
@ -696,7 +698,7 @@ namespace Mesen.GUI.Forms
private void mnuPlayMovie_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Movie files (*.mmo)|*.mmo|All (*.*)|*.*";
ofd.Filter = ResourceHelper.GetMessage("FilterMovie");
ofd.InitialDirectory = ConfigManager.MovieFolder;
if(ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
InteropEmu.MoviePlay(ofd.FileName);
@ -721,7 +723,7 @@ namespace Mesen.GUI.Forms
private void mnuTestRun_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Test files (*.mtp)|*.mtp|All (*.*)|*.*";
ofd.Filter = ResourceHelper.GetMessage("FilterTest");
ofd.InitialDirectory = ConfigManager.TestFolder;
ofd.Multiselect = true;
if(ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
@ -781,7 +783,7 @@ namespace Mesen.GUI.Forms
private void RecordTest(bool resetEmu)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Test files (*.mtp)|*.mtp|All (*.*)|*.*";
sfd.Filter = ResourceHelper.GetMessage("FilterTest");
sfd.InitialDirectory = ConfigManager.TestFolder;
sfd.FileName = Path.GetFileNameWithoutExtension(InteropEmu.GetROMPath()) + ".mtp";
if(sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
@ -792,11 +794,11 @@ namespace Mesen.GUI.Forms
private void mnuTestRecordMovie_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Movie files (*.mmo)|*.mmo|All (*.*)|*.*";
ofd.Filter = ResourceHelper.GetMessage("FilterMovie");
ofd.InitialDirectory = ConfigManager.MovieFolder;
if(ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Test files (*.mtp)|*.mtp|All (*.*)|*.*";
sfd.Filter = ResourceHelper.GetMessage("FilterTest");
sfd.InitialDirectory = ConfigManager.TestFolder;
sfd.FileName = Path.GetFileNameWithoutExtension(ofd.FileName) + ".mtp";
if(sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
@ -808,12 +810,12 @@ namespace Mesen.GUI.Forms
private void mnuTestRecordTest_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Test files (*.mtp)|*.mtp|All (*.*)|*.*";
ofd.Filter = ResourceHelper.GetMessage("FilterTest");
ofd.InitialDirectory = ConfigManager.TestFolder;
if(ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "Test files (*.mtp)|*.mtp|All (*.*)|*.*";
sfd.Filter = ResourceHelper.GetMessage("FilterTest");
sfd.InitialDirectory = ConfigManager.TestFolder;
sfd.FileName = Path.GetFileNameWithoutExtension(ofd.FileName) + ".mtp";
if(sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
@ -850,6 +852,10 @@ namespace Mesen.GUI.Forms
private void mnuPreferences_Click(object sender, EventArgs e)
{
new frmPreferences().ShowDialog(sender);
ResourceHelper.LoadResources(ConfigManager.Config.PreferenceInfo.DisplayLanguage);
ResourceHelper.ApplyResources(this);
UpdateMenus();
InitializeFdsDiskMenu();
}
private void mnuRegion_Click(object sender, EventArgs e)
@ -931,7 +937,7 @@ namespace Mesen.GUI.Forms
if(sideCount > 0) {
for(UInt32 i = 0; i < sideCount; i++) {
UInt32 diskNumber = i;
ToolStripItem item = mnuSelectDisk.DropDownItems.Add("Disk " + (diskNumber/2+1) + " Side " + (diskNumber % 2 == 0 ? "A" : "B"));
ToolStripItem item = mnuSelectDisk.DropDownItems.Add(ResourceHelper.GetMessage("FdsDiskSide", (diskNumber/2+1).ToString(), (diskNumber % 2 == 0 ? "A" : "B")));
item.Click += (object sender, EventArgs args) => {
InteropEmu.FdsInsertDisk(diskNumber);
};
@ -961,15 +967,15 @@ namespace Mesen.GUI.Forms
private void SelectFdsBiosPrompt()
{
if(MessageBox.Show("FDS bios not found. The bios is required to run FDS games." + Environment.NewLine + Environment.NewLine + "Select bios file now?", "Mesen", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) {
if(MesenMsgBox.Show("FdsBiosNotFound", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) {
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "All Files (*.*)|*.*";
ofd.Filter = ResourceHelper.GetMessage("FilterAll");
if(ofd.ShowDialog() == DialogResult.OK) {
if(MD5Helper.GetMD5Hash(ofd.FileName).ToLowerInvariant() == "ca30b50f880eb660a320674ed365ef7a") {
File.Copy(ofd.FileName, Path.Combine(ConfigManager.HomeFolder, "FdsBios.bin"));
LoadROM(_romToLoad);
} else {
MessageBox.Show("The selected bios file is invalid.", "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("InvalidFdsBios", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
@ -1077,12 +1083,12 @@ namespace Mesen.GUI.Forms
}
}));
} else if(displayResult) {
MessageBox.Show("You are running the latest version of Mesen.", "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Information);
MesenMsgBox.Show("MesenUpToDate", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
} catch(Exception ex) {
if(displayResult) {
MessageBox.Show("An error has occurred while trying to check for updates." + Environment.NewLine + Environment.NewLine + "Error details:" + Environment.NewLine + ex.ToString(), "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("ErrorWhileCheckingUpdates", MessageBoxButtons.OK, MessageBoxIcon.Error, ex.ToString());
}
}
});

View File

@ -121,9 +121,9 @@
<value>17, 17</value>
</metadata>
<metadata name="menuTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>107, 17</value>
<value>110, 17</value>
</metadata>
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>220, 17</value>
<value>231, 17</value>
</metadata>
</root>

View File

@ -51,7 +51,7 @@ namespace Mesen.GUI.Forms
Process.Start(updateHelper, string.Format("\"{0}\" \"{1}\" \"{2}\"", srcFilePath, destFilePath, backupFilePath));
} else {
//Download failed, mismatching hashes
MessageBox.Show("Download failed - the file appears to be corrupted. Please visit the Mesen website to download the latest version manually.", "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("UpdateDownloadFailed", MessageBoxButtons.OK, MessageBoxIcon.Error);
DialogResult = DialogResult.Cancel;
}
}

View File

@ -13,7 +13,8 @@
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
@ -386,6 +387,7 @@
<Compile Include="Forms\frmUpdatePrompt.Designer.cs">
<DependentUpon>frmUpdatePrompt.cs</DependentUpon>
</Compile>
<Compile Include="Forms\MesenMsgBox.cs" />
<Compile Include="Forms\NetPlay\frmClientConfig.cs">
<SubType>Form</SubType>
</Compile>
@ -410,6 +412,7 @@
<Compile Include="Forms\NetPlay\frmServerConfig.Designer.cs">
<DependentUpon>frmServerConfig.cs</DependentUpon>
</Compile>
<Compile Include="Forms\ResourceHelper.cs" />
<Compile Include="InteropEmu.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@ -540,12 +543,10 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="..\Windows\Resources\Roboto.12.spritefont">
<Link>Dependencies\Roboto.12.spritefont</Link>
<None Include="Dependencies\Font.24.spritefont">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="..\Windows\Resources\Roboto.32.spritefont">
<Link>Dependencies\Roboto.32.spritefont</Link>
<None Include="Dependencies\Font.64.spritefont">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Properties\Settings.settings">
@ -559,6 +560,19 @@
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="Dependencies\LICENSE.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Dependencies\resources.en.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Dependencies\resources.fr.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Dependencies\resources.ja.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SubType>Designer</SubType>
</Content>
<None Include="Resources\MesenIcon.png" />
<None Include="Resources\system-software-update.png" />
<None Include="Resources\view-refresh.png" />
@ -583,7 +597,7 @@
<EmbeddedResource Include="$(OutputPath)Dependencies.zip">
<Link>Dependencies\Dependencies.zip</Link>
</EmbeddedResource>
<Content Include="Icon.ico" />
<Content Include="D:\Users\Saitoh Hajime\Desktop\Mesen Website\favicon.ico" />
<None Include="Resources\Close.png" />
<None Include="Resources\PreviousArrow.png" />
<None Include="Resources\NextArrow.png" />

View File

@ -7,6 +7,7 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Mesen.GUI.Forms;
namespace Mesen.GUI
{
@ -20,6 +21,8 @@ namespace Mesen.GUI
[DllImport(DLLPath)] public static extern void InitializeEmu([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string homeFolder, IntPtr windowHandle, IntPtr dxViewerHandle);
[DllImport(DLLPath)] public static extern void Release();
[DllImport(DLLPath)] public static extern void SetDisplayLanguage(Language lang);
[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);
@ -64,7 +67,7 @@ namespace Mesen.GUI
[DllImport(DLLPath)] public static extern IntPtr RegisterNotificationCallback(NotificationListener.NotificationCallback callback);
[DllImport(DLLPath)] public static extern void UnregisterNotificationCallback(IntPtr notificationListener);
[DllImport(DLLPath)] public static extern void DisplayMessage([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string title, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string message);
[DllImport(DLLPath)] public static extern void DisplayMessage([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string title, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string message, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))]string param1 = null);
[DllImport(DLLPath)] public static extern void MoviePlay([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string filename);
[DllImport(DLLPath)] public static extern void MovieRecord([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(UTF8Marshaler))]string filename, [MarshalAs(UnmanagedType.I1)]bool reset);
@ -628,11 +631,11 @@ namespace Mesen.GUI
{
if(File.Exists(filename)) {
var md5 = System.Security.Cryptography.MD5.Create();
if(filename.EndsWith(".nes", StringComparison.InvariantCultureIgnoreCase)) {
if(filename.EndsWith(".nes", StringComparison.InvariantCultureIgnoreCase) || filename.EndsWith(".fds", StringComparison.InvariantCultureIgnoreCase)) {
return BitConverter.ToString(md5.ComputeHash(File.ReadAllBytes(filename))).Replace("-", "");
} else if(filename.EndsWith(".zip", StringComparison.InvariantCultureIgnoreCase)) {
foreach(var entry in ZipFile.OpenRead(filename).Entries) {
if(entry.Name.EndsWith(".nes", StringComparison.InvariantCultureIgnoreCase)) {
if(entry.Name.EndsWith(".nes", StringComparison.InvariantCultureIgnoreCase) || entry.Name.EndsWith(".fds", StringComparison.InvariantCultureIgnoreCase)) {
return BitConverter.ToString(md5.ComputeHash(entry.Open())).Replace("-", "");
}
}

View File

@ -9,6 +9,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Mesen.GUI.Config;
using Mesen.GUI.Forms;
namespace Mesen.GUI
{
@ -20,12 +21,12 @@ namespace Mesen.GUI
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
{
MessageBox.Show(e.Exception.ToString(), "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("UnexpectedError", MessageBoxButtons.OK, MessageBoxIcon.Error, e.Exception.ToString());
}
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
MessageBox.Show(e.ExceptionObject.ToString(), "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("UnexpectedError", MessageBoxButtons.OK, MessageBoxIcon.Error, e.ExceptionObject.ToString());
}
/// <summary>
@ -83,7 +84,7 @@ namespace Mesen.GUI
}
}
} catch(Exception e) {
MessageBox.Show(e.ToString(), "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("UnexpectedError", MessageBoxButtons.OK, MessageBoxIcon.Error, e.ToString());
}
}
}

View File

@ -41,6 +41,17 @@ namespace Mesen.GUI
} catch { }
}
public static Stream GetZippedResource(string filename)
{
ZipArchive zip = new ZipArchive(Assembly.GetExecutingAssembly().GetManifestResourceStream("Mesen.GUI.Dependencies.Dependencies.zip"));
foreach(ZipArchiveEntry entry in zip.Entries) {
if(entry.Name == filename) {
return entry.Open();
}
}
return null;
}
public static void ExtractResources()
{
Directory.CreateDirectory(Path.Combine(ConfigManager.HomeFolder, "Resources"));
@ -53,7 +64,7 @@ namespace Mesen.GUI
if(entry.Name.Contains(suffix) || entry.Name == "MesenUpdater.exe") {
string outputFilename = Path.Combine(ConfigManager.HomeFolder, entry.Name.Replace(suffix, ""));
ExtractFile(entry, outputFilename);
} else if(entry.Name == "Roboto.12.spritefont" || entry.Name == "Roboto.32.spritefont") {
} else if(entry.Name == "Font.24.spritefont" || entry.Name == "Font.64.spritefont" || entry.Name == "LICENSE.txt") {
string outputFilename = Path.Combine(ConfigManager.HomeFolder, "Resources", entry.Name.Replace(suffix, ""));
ExtractFile(entry, outputFilename);
}

View File

@ -20,11 +20,11 @@ namespace Mesen.GUI
} catch { }
if(!File.Exists("WinMesen.dll")) {
MessageBox.Show("Mesen was unable to start due to missing files." + Environment.NewLine + Environment.NewLine + "Error: WinMesen.dll is missing.", "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("UnableToStartMissingFiles", MessageBoxButtons.OK, MessageBoxIcon.Error);
} else {
if(MessageBox.Show("Mesen was unable to start due to missing dependencies." + Environment.NewLine + Environment.NewLine + "Mesen requires the Visual Studio 2015 runtime. Would you like to download the runtime from Microsoft's website and install it?", "Mesen", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) {
if(MesenMsgBox.Show("UnableToStartMissingDependencies", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) {
if(!RuntimeChecker.DownloadRuntime()) {
MessageBox.Show("The Visual Studio Runtime could not be installed properly.", "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("CouldNotInstallRuntime", MessageBoxButtons.OK, MessageBoxIcon.Error);
} else {
Process.Start(Process.GetCurrentProcess().MainModule.FileName);
}
@ -53,7 +53,7 @@ namespace Mesen.GUI
Process installer = Process.Start(tempFilename, "/passive /norestart");
installer.WaitForExit();
if(installer.ExitCode != 0) {
MessageBox.Show("Unexpected error: " + installer.ExitCode, "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("UnexpectedError", MessageBoxButtons.OK, MessageBoxIcon.Error, installer.ExitCode.ToString());
return false;
} else {
//Runtime should now be installed, try to launch Mesen again
@ -61,7 +61,7 @@ namespace Mesen.GUI
}
}
} catch(Exception e) {
MessageBox.Show("Unexpected error: " + Environment.NewLine + e.Message, "Mesen", MessageBoxButtons.OK, MessageBoxIcon.Error);
MesenMsgBox.Show("UnexpectedError", MessageBoxButtons.OK, MessageBoxIcon.Error, e.ToString());
} finally {
try {
File.Delete(tempFilename);

View File

@ -192,7 +192,7 @@ namespace InteropEmu {
}
DllExport void __stdcall UnregisterNotificationCallback(INotificationListener *listener) { MessageManager::UnregisterNotificationListener(listener); }
DllExport void __stdcall DisplayMessage(char* title, char* message) { MessageManager::DisplayMessage(title, message); }
DllExport void __stdcall DisplayMessage(char* title, char* message, char* param1) { MessageManager::DisplayMessage(title, message, param1 ? param1 : ""); }
DllExport void __stdcall SaveState(uint32_t stateIndex) { SaveStateManager::SaveState(stateIndex); }
DllExport uint32_t __stdcall LoadState(uint32_t stateIndex) { return SaveStateManager::LoadState(stateIndex); }
@ -249,6 +249,7 @@ namespace InteropEmu {
DllExport void __stdcall SetFlags(EmulationFlags flags) { EmulationSettings::SetFlags(flags); }
DllExport void __stdcall ClearFlags(EmulationFlags flags) { EmulationSettings::ClearFlags(flags); }
DllExport void __stdcall SetDisplayLanguage(Language lang) { EmulationSettings::SetDisplayLanguage(lang); }
DllExport void __stdcall SetChannelVolume(uint32_t channel, double volume) { EmulationSettings::SetChannelVolume((AudioChannel)channel, volume); }
DllExport void __stdcall SetMasterVolume(double volume) { EmulationSettings::SetMasterVolume(volume); }
DllExport void __stdcall SetSampleRate(uint32_t sampleRate) { EmulationSettings::SetSampleRate(sampleRate); }

View File

@ -231,8 +231,8 @@ namespace NES
////////////////////////////////////////////////////////////////////////////
_spriteBatch.reset(new SpriteBatch(_pDeviceContext));
_largeFont.reset(new SpriteFont(_pd3dDevice, L"Resources\\Roboto.32.spritefont"));
_font.reset(new SpriteFont(_pd3dDevice, L"Resources\\Roboto.12.spritefont"));
_largeFont.reset(new SpriteFont(_pd3dDevice, L"Resources\\Font.64.spritefont"));
_font.reset(new SpriteFont(_pd3dDevice, L"Resources\\Font.24.spritefont"));
//Sample state
D3D11_SAMPLER_DESC samplerDesc;
@ -312,34 +312,20 @@ namespace NES
_toasts.push_front(toast);
}
void Renderer::DrawOutlinedString(string message, float x, float y, DirectX::FXMVECTOR color, float scale, DirectX::FXMVECTOR outlineColor, SpriteFont* font)
void Renderer::DrawString(string message, float x, float y, DirectX::FXMVECTOR color, float scale, SpriteFont* font)
{
std::wstring textStr = utf8::utf8::decode(message);
DrawOutlinedString(textStr, x, y, color, scale, outlineColor, font);
DrawString(textStr, x, y, color, scale, font);
}
void Renderer::DrawOutlinedString(std::wstring message, float x, float y, DirectX::FXMVECTOR color, float scale, DirectX::FXMVECTOR outlineColor, SpriteFont* font)
void Renderer::DrawString(std::wstring message, float x, float y, DirectX::FXMVECTOR color, float scale, SpriteFont* font)
{
SpriteBatch* spritebatch = _spriteBatch.get();
const wchar_t *text = message.c_str();
if(font == nullptr) {
font = _font.get();
}
for(uint8_t offsetX = 2; offsetX > 0; offsetX--) {
for(uint8_t offsetY = 2; offsetY > 0; offsetY--) {
font->DrawString(spritebatch, text, XMFLOAT2(x + offsetX, y + offsetY), outlineColor, 0.0f, XMFLOAT2(0, 0), scale);
font->DrawString(spritebatch, text, XMFLOAT2(x - offsetX, y + offsetY), outlineColor, 0.0f, XMFLOAT2(0, 0), scale);
font->DrawString(spritebatch, text, XMFLOAT2(x + offsetX, y - offsetY), outlineColor, 0.0f, XMFLOAT2(0, 0), scale);
font->DrawString(spritebatch, text, XMFLOAT2(x - offsetX, y - offsetY), outlineColor, 0.0f, XMFLOAT2(0, 0), scale);
font->DrawString(spritebatch, text, XMFLOAT2(x + offsetX, y), outlineColor, 0.0f, XMFLOAT2(0, 0), scale);
font->DrawString(spritebatch, text, XMFLOAT2(x - offsetX, y), outlineColor, 0.0f, XMFLOAT2(0, 0), scale);
font->DrawString(spritebatch, text, XMFLOAT2(x, y + offsetY), outlineColor, 0.0f, XMFLOAT2(0, 0), scale);
font->DrawString(spritebatch, text, XMFLOAT2(x, y - offsetY), outlineColor, 0.0f, XMFLOAT2(0, 0), scale);
}
}
font->DrawString(spritebatch, text, XMFLOAT2(x, y), color, 0.0f, XMFLOAT2(0, 0), scale);
font->DrawString(_spriteBatch.get(), text, XMFLOAT2(x, y), color, 0.0f, XMFLOAT2(0, 0), scale);
}
void Renderer::UpdateFrame(void *frameBuffer, uint32_t width, uint32_t height)
@ -395,7 +381,7 @@ namespace NES
_pDeviceContext->Map(_overlayTexture, 0, D3D11_MAP_WRITE_DISCARD, 0, &dd);
for(uint32_t i = 0, len = 8*8; i < len; i++) {
//Gray transparent overlay
((uint32_t*)dd.pData)[i] = 0x99222222;
((uint32_t*)dd.pData)[i] = 0xAA222222;
}
_pDeviceContext->Unmap(_overlayTexture, 0);
@ -403,9 +389,8 @@ namespace NES
_spriteBatch->Draw(shaderResourceView, destRect); // , position, &sourceRect, Colors::White, 0.0f, position, 4.0f);
shaderResourceView->Release();
XMVECTOR stringDimensions = _largeFont->MeasureString(L"PAUSED");
DrawOutlinedString("PAUSED", (float)_screenWidth / 2 - stringDimensions.m128_f32[0] / 2, (float)_screenHeight / 2 - stringDimensions.m128_f32[1] / 2, Colors::AntiqueWhite, 1.0f, Colors::Black, _largeFont.get());
XMVECTOR stringDimensions = _largeFont->MeasureString(L"PAUSE");
DrawString("PAUSE", (float)_screenWidth / 2 - stringDimensions.m128_f32[0] / 2, (float)_screenHeight / 2 - stringDimensions.m128_f32[1] / 2 - 8, Colors::AntiqueWhite, 1.0f, _largeFont.get());
}
void Renderer::Render()
@ -461,7 +446,7 @@ namespace NES
}
string fpsString = string("FPS: ") + std::to_string(_currentFPS) + " / " + std::to_string(_currentRenderedFPS);
DrawOutlinedString(fpsString, (float)(_screenWidth - 120), 13, Colors::AntiqueWhite, 1.0f);
DrawString(fpsString, (float)(_screenWidth - 120), 13, Colors::AntiqueWhite, 1.0f);
}
}
@ -581,10 +566,11 @@ namespace NES
XMVECTORF32 color = { opacity, opacity, opacity, opacity };
float textLeftMargin = 4.0f;
int lineHeight = 25;
string text = "[" + toast->GetToastTitle() + "] " + toast->GetToastMessage();
uint32_t lineCount = 0;
std::wstring wrappedText = WrapText(text, _font.get(), _screenWidth - textLeftMargin * 2 - 20, lineCount);
lastHeight += lineCount * 20;
DrawOutlinedString(wrappedText, textLeftMargin, (float)(_screenHeight - lastHeight), color, 1, { 0.0f,0.0f,0.0f, opacity });
lastHeight += lineCount * lineHeight;
DrawString(wrappedText, textLeftMargin, (float)(_screenHeight - lastHeight), color, 1);
}
}

View File

@ -72,8 +72,8 @@ namespace NES {
void DrawPauseScreen();
std::wstring WrapText(string text, SpriteFont* font, float maxLineWidth, uint32_t &lineCount);
void DrawOutlinedString(string message, float x, float y, DirectX::FXMVECTOR color, float scale, DirectX::FXMVECTOR outlineColor = Colors::Black, SpriteFont* font = nullptr);
void DrawOutlinedString(std::wstring message, float x, float y, DirectX::FXMVECTOR color, float scale, DirectX::FXMVECTOR outlineColor = Colors::Black, SpriteFont* font = nullptr);
void DrawString(string message, float x, float y, DirectX::FXMVECTOR color, float scale, SpriteFont* font = nullptr);
void DrawString(std::wstring message, float x, float y, DirectX::FXMVECTOR color, float scale, SpriteFont* font = nullptr);
void DrawToasts();
void DrawToast(shared_ptr<ToastInfo> toast, int &lastHeight);

View File

@ -24,12 +24,12 @@ SoundManager::~SoundManager()
Release();
}
bool CALLBACK SoundManager::DirectSoundEnumProc(LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVOID lpContext)
bool CALLBACK SoundManager::DirectSoundEnumProc(LPGUID lpGUID, LPCWSTR lpszDesc, LPCSTR lpszDrvName, LPVOID lpContext)
{
vector<SoundDeviceInfo> *devices = (vector<SoundDeviceInfo>*)lpContext;
SoundDeviceInfo deviceInfo;
deviceInfo.description = lpszDesc;
deviceInfo.description = utf8::utf8::encode(lpszDesc);
if(lpGUID != nullptr) {
memcpy((void*)&deviceInfo.guid, lpGUID, 16);
} else {
@ -43,7 +43,7 @@ bool CALLBACK SoundManager::DirectSoundEnumProc(LPGUID lpGUID, LPCSTR lpszDesc,
vector<SoundDeviceInfo> SoundManager::GetAvailableDeviceInfo()
{
vector<SoundDeviceInfo> devices;
DirectSoundEnumerate((LPDSENUMCALLBACKA)SoundManager::DirectSoundEnumProc, &devices);
DirectSoundEnumerateW((LPDSENUMCALLBACKW)SoundManager::DirectSoundEnumProc, &devices);
return devices;
}

View File

@ -26,7 +26,7 @@ public:
private:
vector<SoundDeviceInfo> GetAvailableDeviceInfo();
static bool CALLBACK DirectSoundEnumProc(LPGUID lpGUID, LPCSTR lpszDesc, LPCSTR lpszDrvName, LPVOID lpContext);
static bool CALLBACK DirectSoundEnumProc(LPGUID lpGUID, LPCWSTR lpszDesc, LPCSTR lpszDrvName, LPVOID lpContext);
bool InitializeDirectSound(uint32_t sampleRate);
void ShutdownDirectSound();
void ClearSecondaryBuffer();

View File

@ -390,10 +390,6 @@
</ItemGroup>
<ItemGroup>
<None Include="DirectXTK\SimpleMath.inl" />
<None Include="Resources\Roboto.12.spritefont">
<DeploymentContent>false</DeploymentContent>
</None>
<None Include="Resources\Roboto.32.spritefont" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@ -9,10 +9,6 @@
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Header Files\DirectXTK">
<UniqueIdentifier>{e65ed40e-43de-490e-8c87-ff96e845a513}</UniqueIdentifier>
</Filter>
@ -103,11 +99,5 @@
<None Include="DirectXTK\SimpleMath.inl">
<Filter>Header Files\DirectXTK</Filter>
</None>
<None Include="Resources\Roboto.12.spritefont">
<Filter>Resource Files</Filter>
</None>
<None Include="Resources\Roboto.32.spritefont">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
</Project>