Command line: Added a /recordmovie option to start recording a movie (.mmo) file
This commit is contained in:
parent
080d25349d
commit
a2a6c4489b
11 changed files with 78 additions and 15 deletions
|
@ -608,7 +608,6 @@
|
|||
<Control ID="tpgAudioOptions">Opcions de so</Control>
|
||||
<Control ID="tpgEmulationOptions">Opcions de l'emulació</Control>
|
||||
<Control ID="lblExplanation">Això iniciarà Mesen en mode de pantalla completa i amb la rom "MyGame.nes" carregada. A més, farà servir el filtre NTSC ajustat a una escala de 2x i configurarà les opcions de sobreescaneig. El paràmetre "DoNotSaveSettings" s'utilitza per evitar que els canvis efectuats des de la línia d'ordres es desin permanentment a la configuració de Mesen.</Control>
|
||||
<Control ID="txtGeneralOptions">/fullscreen - Inicia Mesen en pantalla completa /DoNotSaveSettings - Evita que els canvis es desin (útil per a evitar que les opcions de la línia d'ordres es converteixin en la configuració per defecte)</Control>
|
||||
</Form>
|
||||
<Form ID="frmRecordMovie" Title="Movie Recording Options">
|
||||
<Control ID="lblSaveTo">Save to:</Control>
|
||||
|
@ -734,6 +733,10 @@
|
|||
<Message ID="BandaiMicrophone">Bandai Microphone</Message>
|
||||
<Message ID="DatachBarcodeReader">Datach Barcode Reader</Message>
|
||||
|
||||
<Message ID="HelpFullscreen">/fullscreen - Inicia Mesen en pantalla completa</Message>
|
||||
<Message ID="HelpDoNotSaveSettings">/DoNotSaveSettings - Evita que els canvis es desin (útil per a evitar que les opcions de la línia d'ordres es converteixin en la configuració per defecte)</Message>
|
||||
<Message ID="HelpRecordMovie">/RecordMovie="filename.mmo" - Start recording a movie after the specified game is loaded.</Message>
|
||||
|
||||
<Message ID="Resume">Continua</Message>
|
||||
<Message ID="Pause">Pausa</Message>
|
||||
<Message ID="StartServer">Inicia un servidor</Message>
|
||||
|
|
|
@ -618,7 +618,6 @@
|
|||
<Control ID="tpgAudioOptions">Audio Options</Control>
|
||||
<Control ID="tpgEmulationOptions">Emulation Options</Control>
|
||||
<Control ID="lblExplanation">This will start Mesen in fullscreen mode with the "MyGame.nes" rom loaded. It will also use the NTSC filter, set at a 2x scale and configure the Overscan settings. The "DoNotSaveSettings" flag is used to prevent the command line switches from pernanently altering Mesen's settings.</Control>
|
||||
<Control ID="txtGeneralOptions">/fullscreen - Start Mesen in fullscreen mode /DoNotSaveSettings - Prevent settings from being saved to the disk (useful to prevent command line options from becoming the default settings)</Control>
|
||||
</Form>
|
||||
<Form ID="frmCopyFiles" Title="Please wait...">
|
||||
<Control ID="lblCopying">Copying:</Control>
|
||||
|
@ -764,6 +763,10 @@
|
|||
<Message ID="BandaiMicrophone">Bandai Microphone</Message>
|
||||
<Message ID="DatachBarcodeReader">Datach Barcode Reader</Message>
|
||||
|
||||
<Message ID="HelpFullscreen">/fullscreen - Start Mesen in fullscreen mode</Message>
|
||||
<Message ID="HelpDoNotSaveSettings">/DoNotSaveSettings - Prevent settings from being saved to the disk (useful to prevent command line options from becoming the default settings)</Message>
|
||||
<Message ID="HelpRecordMovie">/RecordMovie="filename.mmo" - Start recording a movie after the specified game is loaded.</Message>
|
||||
|
||||
<Message ID="Resume">Resume</Message>
|
||||
<Message ID="Pause">Pause</Message>
|
||||
<Message ID="StartServer">Start Server</Message>
|
||||
|
|
|
@ -606,7 +606,6 @@
|
|||
<Control ID="tpgAudioOptions">Opciones de audio</Control>
|
||||
<Control ID="tpgEmulationOptions">Opciones de emulación</Control>
|
||||
<Control ID="lblExplanation">Esto iniciará Mesen en modo de pantalla completa con la rom "MyGame.nes" cargada. También usa el filtro NTSC, ajuste a escala 2x y establece la configuración de Overscan. El parámetro "DoNotSaveSettings" se usa para prevenir que las opciones dadas desde la línea de comandos alteren la configuración de Mesen.</Control>
|
||||
<Control ID="txtGeneralOptions">/fullscreen - Inicia Mesen en pantalla completa /DoNotSaveSettings - Previene que las opciones se graben en disco (útil para evitar que las opciones de la línea de comandos se conviertan en la configuración predeterminada)</Control>
|
||||
</Form>
|
||||
<Form ID="frmCopyFiles" Title="Por favor espere...">
|
||||
<Control ID="lblCopying">Copiando:</Control>
|
||||
|
@ -751,6 +750,10 @@
|
|||
<Message ID="BandaiMicrophone">Micrófono Bandai</Message>
|
||||
<Message ID="DatachBarcodeReader">Lector de código de barras Datach</Message>
|
||||
|
||||
<Message ID="HelpFullscreen">/fullscreen - Inicia Mesen en pantalla completa</Message>
|
||||
<Message ID="HelpDoNotSaveSettings">/DoNotSaveSettings - Previene que las opciones se graben en disco (útil para evitar que las opciones de la línea de comandos se conviertan en la configuración predeterminada)</Message>
|
||||
<Message ID="HelpRecordMovie">/RecordMovie="filename.mmo" - Start recording a movie after the specified game is loaded.</Message>
|
||||
|
||||
<Message ID="Resume">Continuar</Message>
|
||||
<Message ID="Pause">Pausa</Message>
|
||||
<Message ID="StartServer">Iniciar servidor</Message>
|
||||
|
|
|
@ -618,7 +618,6 @@
|
|||
<Control ID="tpgAudioOptions">Options audio</Control>
|
||||
<Control ID="tpgEmulationOptions">Options d'émulation</Control>
|
||||
<Control ID="lblExplanation">Cet exemple ouvrira Mesen en mode plein écran avec le jeu "MyGame.nes" de chargé. Le filtre vidéo NTSC avec un facteur d'agrandissement de 2x sera utilisé et les paramètres d'overscan seront modifiés. L'option "DoNotSaveSettings" empêche les options données en ligne de commande de devenir les options par défaut de l'émulateur.</Control>
|
||||
<Control ID="txtGeneralOptions">/fullscreen - Démarre Mesen en mode plein écran /DoNotSaveSettings - Empêche la sauvegarde des paramètres sur le disque (autrement les options données en ligne de commande seront permanentes)</Control>
|
||||
</Form>
|
||||
<Form ID="frmCopyFiles" Title="En cours d'exécution...">
|
||||
<Control ID="lblCopying">Copie de :</Control>
|
||||
|
@ -764,6 +763,10 @@
|
|||
<Message ID="BandaiMicrophone">Microphone Bandai</Message>
|
||||
<Message ID="DatachBarcodeReader">Lecteur code-barres Datach</Message>
|
||||
|
||||
<Message ID="HelpFullscreen">/fullscreen - Démarre Mesen en mode plein écran</Message>
|
||||
<Message ID="HelpDoNotSaveSettings">/DoNotSaveSettings - Empêche la sauvegarde des paramètres sur le disque (autrement les options données en ligne de commande seront permanentes)</Message>
|
||||
<Message ID="HelpRecordMovie">/RecordMovie="nom_du_film.mmo" - Démarre l'enregistrement d'un film pour le jeu spécifié en ligne de commande.</Message>
|
||||
|
||||
<Message ID="Resume">Continuer</Message>
|
||||
<Message ID="Pause">Pause</Message>
|
||||
<Message ID="StartServer">Démarrer serveur</Message>
|
||||
|
|
|
@ -608,7 +608,6 @@
|
|||
<Control ID="tpgAudioOptions">音声</Control>
|
||||
<Control ID="tpgEmulationOptions">エミュレーション</Control>
|
||||
<Control ID="lblExplanation">Mesenを全画面表示の状態で"MyGame.nes"を起動する. 画面エフェクトをNTSCにして、映像サイズを2xにして、オーバースキャン設定を変更する。</Control>
|
||||
<Control ID="txtGeneralOptions">/fullscreen - 全画面表示の状態で起動する /DoNotSaveSettings - 設定のセーブ機能を無効にする</Control>
|
||||
</Form>
|
||||
<Form ID="frmCopyFiles" Title="しばらくお待ちください">
|
||||
<Control ID="lblCopying">ファイル:</Control>
|
||||
|
@ -754,6 +753,10 @@
|
|||
<Message ID="BandaiMicrophone">Bandaiマイクロフォン</Message>
|
||||
<Message ID="DatachBarcodeReader">Datachバーコードリーダー</Message>
|
||||
|
||||
<Message ID="HelpFullscreen">/fullscreen - 全画面表示の状態で起動する</Message>
|
||||
<Message ID="HelpDoNotSaveSettings">/DoNotSaveSettings - 設定のセーブ機能を無効にする</Message>
|
||||
<Message ID="HelpRecordMovie">/RecordMovie="filename.mmo" - ゲームをロードしてから指定されたファイルに動画を録画する。</Message>
|
||||
|
||||
<Message ID="Resume">再開</Message>
|
||||
<Message ID="Pause">ポーズ</Message>
|
||||
<Message ID="StartServer">サーバを起動する</Message>
|
||||
|
|
|
@ -618,7 +618,6 @@
|
|||
<Control ID="tpgAudioOptions">Opções de áudio</Control>
|
||||
<Control ID="tpgEmulationOptions">Opções de emulação</Control>
|
||||
<Control ID="lblExplanation">Isso iniciará o Mesen em modo de tela cheia com a rom "MeuJogo.nes" carregada. Também usará o filtro NTSC, configurado em uma escala 2x e ajusta as configurações de Overscan. O sinalizador "DoNotSaveSettings" é usado para evitar que a linha de comando altere de forma permanente as configurações do Mesen.</Control>
|
||||
<Control ID="txtGeneralOptions">/fullscreen - Inicia o Mesen em modo tela cheia /DoNotSaveSettings - Impede que as configurações sejam salvas no disco (útil para evitar que as opções da linha de comando se tornem as configurações padrão)</Control>
|
||||
</Form>
|
||||
<Form ID="frmCopyFiles" Title="Aguarde...">
|
||||
<Control ID="lblCopying">Copiando:</Control>
|
||||
|
@ -764,6 +763,10 @@
|
|||
<Message ID="BandaiMicrophone">Microfone Bandai</Message>
|
||||
<Message ID="DatachBarcodeReader">Leitor de código de barras Datach</Message>
|
||||
|
||||
<Message ID="HelpFullscreen">/fullscreen - Inicia o Mesen em modo tela cheia</Message>
|
||||
<Message ID="HelpDoNotSaveSettings">/DoNotSaveSettings - Impede que as configurações sejam salvas no disco (útil para evitar que as opções da linha de comando se tornem as configurações padrão)</Message>
|
||||
<Message ID="HelpRecordMovie">/RecordMovie="filename.mmo" - Start recording a movie after the specified game is loaded.</Message>
|
||||
|
||||
<Message ID="Resume">Continuar</Message>
|
||||
<Message ID="Pause">Pausar</Message>
|
||||
<Message ID="StartServer">Iniciar servidor</Message>
|
||||
|
|
|
@ -606,7 +606,6 @@
|
|||
<Control ID="tpgAudioOptions">Audio Options</Control>
|
||||
<Control ID="tpgEmulationOptions">Emulation Options</Control>
|
||||
<Control ID="lblExplanation">This will start Mesen in fullscreen mode with the "MyGame.nes" rom loaded. It will also use the NTSC filter, set at a 2x scale and configure the Overscan settings. The "DoNotSaveSettings" flag is used to prevent the command line switches from pernanently altering Mesen's settings.</Control>
|
||||
<Control ID="txtGeneralOptions">/fullscreen - Start Mesen in fullscreen mode /DoNotSaveSettings - Prevent settings from being saved to the disk (useful to prevent command line options from becoming the default settings)</Control>
|
||||
</Form>
|
||||
<Form ID="frmCopyFiles" Title="Please wait...">
|
||||
<Control ID="lblCopying">Copying:</Control>
|
||||
|
@ -752,6 +751,10 @@
|
|||
<Message ID="BandaiMicrophone">Bandai Microphone</Message>
|
||||
<Message ID="DatachBarcodeReader">Datach Barcode Reader</Message>
|
||||
|
||||
<Message ID="HelpFullscreen">/fullscreen - Start Mesen in fullscreen mode</Message>
|
||||
<Message ID="HelpDoNotSaveSettings">/DoNotSaveSettings - Prevent settings from being saved to the disk (useful to prevent command line options from becoming the default settings)</Message>
|
||||
<Message ID="HelpRecordMovie">/RecordMovie="filename.mmo" - Start recording a movie after the specified game is loaded.</Message>
|
||||
|
||||
<Message ID="Resume">Продолжить</Message>
|
||||
<Message ID="Pause">Пауза</Message>
|
||||
<Message ID="StartServer">Запустить сервер</Message>
|
||||
|
|
|
@ -606,7 +606,6 @@
|
|||
<Control ID="tpgAudioOptions">Аудiо Опцiї</Control>
|
||||
<Control ID="tpgEmulationOptions">Опцiї Эмуляцiї</Control>
|
||||
<Control ID="lblExplanation">Це запустить Mesen у повноекранному режимi з "MyGame.nes" завантаженим ромом. Вiн також буде використовувати фiльтр NTSC, встановлений у 2x масштабi та налаштує параметри Overscan. Прапор "DoNotSaveSettings" використовується для запобігання перемикання командного рядка від випадкової зміни налаштувань Mesen.</Control>
|
||||
<Control ID="txtGeneralOptions">/fullscreen - Запустити Mesen у повноекранному режимi /DoNotSaveSettings - Заборонити збереження налаштувань на диску (корисно щоб запобігти становленню параметрів командного рядка за замовчуванням)</Control>
|
||||
</Form>
|
||||
<Form ID="frmCopyFiles" Title="Будь ласка зачекайте...">
|
||||
<Control ID="lblCopying">Копіювання:</Control>
|
||||
|
@ -752,6 +751,10 @@
|
|||
<Message ID="BandaiMicrophone">Bandai Microphone</Message>
|
||||
<Message ID="DatachBarcodeReader">Datach Barcode Reader</Message>
|
||||
|
||||
<Message ID="HelpFullscreen">/fullscreen - Запустити Mesen у повноекранному режимi</Message>
|
||||
<Message ID="HelpDoNotSaveSettings">/DoNotSaveSettings - Заборонити збереження налаштувань на диску (корисно щоб запобігти становленню параметрів командного рядка за замовчуванням)</Message>
|
||||
<Message ID="HelpRecordMovie">/RecordMovie="filename.mmo" - Start recording a movie after the specified game is loaded.</Message>
|
||||
|
||||
<Message ID="Resume">Продовжити</Message>
|
||||
<Message ID="Pause">Пауза</Message>
|
||||
<Message ID="StartServer">Запустити сервер</Message>
|
||||
|
|
|
@ -610,7 +610,6 @@
|
|||
<Control ID="tpgAudioOptions">音频选项</Control>
|
||||
<Control ID="tpgEmulationOptions">模拟选项</Control>
|
||||
<Control ID="lblExplanation">使用上面的命令行,Mesen 会以全屏模式启动、加载 "MyGame.nes"、使用 NTSC 滤镜、画面扩大到 2 倍,并且改变过扫描设置. "DoNotSaveSettings" 用于阻止命令行选项替代 Mesen 原本的设置.</Control>
|
||||
<Control ID="txtGeneralOptions">/fullscreen - 全屏模式启动 Mesen /DoNotSaveSettings - 阻止命令行的选项替代 Mesen 原本的设置 (防止命令行选项成为默认设置).</Control>
|
||||
</Form>
|
||||
<Form ID="frmCopyFiles" Title="正在复制,请稍候...">
|
||||
<Control ID="lblCopying">复制中:</Control>
|
||||
|
@ -749,9 +748,15 @@
|
|||
<Message ID="MovieSaveError">尝试保存电影文件时发生错误.</Message>
|
||||
<Message ID="ClearHistory">清除历史</Message>
|
||||
<Message ID="LastFolderUsed">上次使用的文件夹</Message>
|
||||
|
||||
<Message ID="MouseModeEnabled">启用鼠标模式 - 按 ESC 或 pause 来释放光标.</Message>
|
||||
<Message ID="BandaiMicrophone">Bandai 麦克风</Message>
|
||||
<Message ID="DatachBarcodeReader">附加条码机</Message>
|
||||
|
||||
<Message ID="HelpFullscreen">/fullscreen - 全屏模式启动 Mesen</Message>
|
||||
<Message ID="HelpDoNotSaveSettings">/DoNotSaveSettings - 阻止命令行的选项替代 Mesen 原本的设置 (防止命令行选项成为默认设置).</Message>
|
||||
<Message ID="HelpRecordMovie">/RecordMovie="filename.mmo" - Start recording a movie after the specified game is loaded.</Message>
|
||||
|
||||
<Message ID="Resume">恢复</Message>
|
||||
<Message ID="Pause">暂停</Message>
|
||||
<Message ID="StartServer">启动服务器</Message>
|
||||
|
|
|
@ -46,7 +46,13 @@ namespace Mesen.GUI.Forms
|
|||
|
||||
sb.Clear();
|
||||
DisplayOptions(typeof(Configuration), sb);
|
||||
txtGeneralOptions.Text = ConvertSlashes(txtGeneralOptions.Text + Environment.NewLine + sb.ToString().Trim());
|
||||
|
||||
txtGeneralOptions.Text = ConvertSlashes(
|
||||
ResourceHelper.GetMessage("HelpFullscreen") + Environment.NewLine +
|
||||
ResourceHelper.GetMessage("HelpDoNotSaveSettings") + Environment.NewLine +
|
||||
ResourceHelper.GetMessage("HelpRecordMovie") + Environment.NewLine +
|
||||
sb.ToString().Trim()
|
||||
);
|
||||
}
|
||||
|
||||
private string ConvertSlashes(string options)
|
||||
|
|
|
@ -33,7 +33,10 @@ namespace Mesen.GUI.Forms
|
|||
private frmHistoryViewer _historyViewerWindow;
|
||||
private frmHdPackEditor _hdPackEditorWindow;
|
||||
private ResourcePath? _currentRomPath = null;
|
||||
List<string> _luaScriptsToLoad = new List<string>();
|
||||
|
||||
private string _movieToRecord = null;
|
||||
private List<string> _luaScriptsToLoad = new List<string>();
|
||||
|
||||
private Image _pauseButton = Resources.Pause;
|
||||
private Image _playButton = Resources.Play;
|
||||
private string _currentGame = null;
|
||||
|
@ -109,6 +112,25 @@ namespace Mesen.GUI.Forms
|
|||
ConfigManager.DoNotSaveSettings = true;
|
||||
}
|
||||
|
||||
Regex recordMovieCommand = new Regex("/recordmovie=([^\"]+)");
|
||||
foreach(string command in switches) {
|
||||
Match match = recordMovieCommand.Match(command);
|
||||
if(match.Success) {
|
||||
string moviePath = match.Groups[1].Value;
|
||||
string folder = Path.GetDirectoryName(moviePath);
|
||||
if(string.IsNullOrWhiteSpace(folder)) {
|
||||
moviePath = Path.Combine(ConfigManager.MovieFolder, moviePath);
|
||||
} else if(!Path.IsPathRooted(moviePath)) {
|
||||
moviePath = Path.Combine(Program.OriginalFolder, moviePath);
|
||||
}
|
||||
if(!moviePath.ToLower().EndsWith(".mmo")) {
|
||||
moviePath += ".mmo";
|
||||
}
|
||||
_movieToRecord = moviePath;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ConfigManager.ProcessSwitches(switches);
|
||||
}
|
||||
|
||||
|
@ -120,18 +142,18 @@ namespace Mesen.GUI.Forms
|
|||
if(romPath != null) {
|
||||
this.LoadFile(romPath);
|
||||
} else {
|
||||
|
||||
if(_emuThread == null) {
|
||||
//When no ROM is loaded, only process Lua scripts if a ROM was specified as a command line param
|
||||
_luaScriptsToLoad.Clear();
|
||||
_movieToRecord = null;
|
||||
} else {
|
||||
//No game was specified, but a game is running already, load the scripts right away
|
||||
LoadLuaScripts();
|
||||
ProcessPostLoadCommandSwitches();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadLuaScripts()
|
||||
private void ProcessPostLoadCommandSwitches()
|
||||
{
|
||||
if(_luaScriptsToLoad.Count > 0) {
|
||||
foreach(string luaScript in _luaScriptsToLoad) {
|
||||
|
@ -140,6 +162,12 @@ namespace Mesen.GUI.Forms
|
|||
}
|
||||
_luaScriptsToLoad.Clear();
|
||||
}
|
||||
|
||||
if(_movieToRecord != null) {
|
||||
RecordMovieOptions options = new RecordMovieOptions(_movieToRecord, "", "", RecordMovieFrom.StartWithSaveData);
|
||||
InteropEmu.MovieRecord(ref options);
|
||||
_movieToRecord = null;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
|
@ -610,7 +638,7 @@ namespace Mesen.GUI.Forms
|
|||
this.StartEmuThread();
|
||||
this.BeginInvoke((MethodInvoker)(() => {
|
||||
UpdateViewerSize();
|
||||
LoadLuaScripts();
|
||||
ProcessPostLoadCommandSwitches();
|
||||
}));
|
||||
|
||||
Task.Run(() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue