mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Display warning when dumping audio if file exists
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user