diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-02-14 18:38:10 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-02-14 18:38:10 -0500 |
| commit | f60971831fbc05b9346a06d1fd96dcc08396ca44 (patch) | |
| tree | 42200ccbe3e1c879aaaf877f5125af1197e950cc /Source/Core/VideoCommon/AVIDump.cpp | |
| parent | 405444d4fec446fbcc8665fb8c1b6107220876ec (diff) | |
| parent | 3500740dd4b7ca47bd42c34134d887884bdba0f4 (diff) | |
Merge pull request #2056 from delroth/avidump-silent
Windows AVIDump: support "silent" frame dumping
Diffstat (limited to 'Source/Core/VideoCommon/AVIDump.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/AVIDump.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp index 1dcbbe4d9c..99c6b0f8e3 100644 --- a/Source/Core/VideoCommon/AVIDump.cpp +++ b/Source/Core/VideoCommon/AVIDump.cpp @@ -88,8 +88,11 @@ bool AVIDump::CreateFile() // Ask to delete file if (File::Exists(movie_file_name)) { - if (AskYesNoT("Delete the existing file '%s'?", movie_file_name.c_str())) + if (SConfig::GetInstance().m_DumpFramesSilent || + AskYesNoT("Delete the existing file '%s'?", movie_file_name.c_str())) + { File::Delete(movie_file_name); + } } AVIFileInit(); @@ -291,7 +294,16 @@ bool AVIDump::SetCompressionOptions() memset(&s_options, 0, sizeof(s_options)); s_array_options[0] = &s_options; - return (AVISaveOptions(s_emu_wnd, 0, 1, &s_stream, s_array_options) != 0); + if (SConfig::GetInstance().m_DumpFramesSilent) + { + s_options.fccType = streamtypeVIDEO; + s_options.fccHandler = mmioFOURCC('D', 'I', 'B', ' '); // Uncompressed + return true; + } + else + { + return (AVISaveOptions(s_emu_wnd, 0, 1, &s_stream, s_array_options) != 0); + } } bool AVIDump::SetVideoFormat() |
