diff options
Diffstat (limited to 'Source/Core/AudioCommon/WaveFile.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/WaveFile.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/AudioCommon/WaveFile.cpp b/Source/Core/AudioCommon/WaveFile.cpp index 1a9fee3319..912dc7fbf0 100644 --- a/Source/Core/AudioCommon/WaveFile.cpp +++ b/Source/Core/AudioCommon/WaveFile.cpp @@ -24,6 +24,20 @@ WaveFileWriter::~WaveFileWriter() bool WaveFileWriter::Start(const std::string& filename, unsigned int HLESampleRate) { + // Ask to delete file + if (File::Exists(filename)) + { + if (AskYesNoT("Delete the existing file '%s'?", filename.c_str())) + { + File::Delete(filename); + } + else + { + // Stop and cancel dumping the audio + return false; + } + } + // Check if the file is already open if (file) { |
