mirror of https://github.com/PCSX2/pcsx2.git
input-rec: Display message when we fail to create/open file
This commit is contained in:
parent
a95288946c
commit
7878dee32d
|
@ -1748,6 +1748,12 @@ void MainWindow::onInputRecNewActionTriggered()
|
|||
m_ui.actionToolbarReset->setEnabled(!g_InputRecording.isTypeSavestate());
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Host::ReportErrorAsync(
|
||||
TRANSLATE_SV("MainWindow", "Input Recording Failed"),
|
||||
fmt::format(TRANSLATE_FS("MainWindow", "Failed to create file: {}"), filePath));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1801,6 +1807,12 @@ void MainWindow::onInputRecPlayActionTriggered()
|
|||
m_ui.actionToolbarReset->setEnabled(!g_InputRecording.isTypeSavestate());
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Host::ReportErrorAsync(
|
||||
TRANSLATE_SV("MainWindow", "Input Playback Failed"),
|
||||
fmt::format(TRANSLATE_FS("MainWindow", "Failed to open file: {}"), filename));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <QtCore/QDir>
|
||||
#include <QtCore/QString>
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <QtWidgets/qfiledialog.h>
|
||||
|
||||
// TODO - for now this uses a very naive implementation that fills the entire table
|
||||
|
@ -96,7 +97,11 @@ void InputRecordingViewer::openFile()
|
|||
if (m_file_open)
|
||||
{
|
||||
loadTable();
|
||||
} // TODO else error
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::critical(this, tr("Opening Recording Failed"), tr("Failed to open file: %1").arg(QString::fromUtf8(fileName.c_str())));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue