Allow unattended dumping to JMD

This commit is contained in:
Ilari Liusvaara 2011-10-12 03:41:54 +03:00
parent 65f5f37033
commit aedbba61ef
2 changed files with 15 additions and 1 deletions

View file

@ -69,8 +69,11 @@ namespace
unsigned level = 7;
std::string prefix = "avidump";
uint64_t length = 0;
bool jmd = false;
for(auto i = cmdline.begin(); i != cmdline.end(); i++) {
std::string a = *i;
if(a == "--jmd")
jmd = true;
if(a.length() > 9 && a.substr(0, 9) == "--prefix=")
prefix = a.substr(9);
if(a.length() > 8 && a.substr(0, 8) == "--level=")
@ -98,7 +101,10 @@ namespace
}
std::cout << "Invoking dumper" << std::endl;
std::ostringstream cmd;
cmd << "dump-avi " << level << " " << prefix;
if(jmd)
cmd << "dump-jmd " << level << " " << prefix;
else
cmd << "dump-avi " << level << " " << prefix;
command::invokeC(cmd.str());
if(av_snooper::dump_in_progress()) {
std::cout << "Dumper attach confirmed" << std::endl;

View file

@ -539,6 +539,14 @@ Run specified lua script (lsnes-avidump.exe does not have initialization
files).
\end_layout
\begin_layout Subsubsection
--jmd
\end_layout
\begin_layout Standard
Use JMD dumping instead of AVI dumping.
\end_layout
\begin_layout Section
Startup file lsnes.rc
\end_layout