mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
Display warning when dumping audio if file exists
This commit is contained in:
parent
f431b18675
commit
debc40e85b
2 changed files with 38 additions and 8 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue