Qt: Fix GIF view not allowing manual filename entry

This commit is contained in:
Vicki Pfau 2020-02-02 16:05:27 -08:00
parent d2f205aa9e
commit d33f1d1392
2 changed files with 9 additions and 10 deletions

View File

@ -27,6 +27,7 @@ Other fixes:
- Qt: Fix toggled actions on gamepads (fixes mgba.io/i/1650)
- Qt: Fix extraneous dialog (fixes mgba.io/i/1654)
- Qt: Fix window title not updating after shutting down game
- Qt: Fix GIF view not allowing manual filename entry
- Util: Fix crash reading invalid ELFs
Misc:
- Qt: Renderer can be changed while a game is running

View File

@ -59,22 +59,20 @@ void GIFView::stopRecording() {
emit recordingStopped();
FFmpegEncoderClose(&m_encoder);
m_ui.stop->setEnabled(false);
m_ui.start->setEnabled(true);
m_ui.start->setEnabled(!m_filename.isEmpty());
m_ui.frameskip->setEnabled(true);
}
void GIFView::selectFile() {
QString filename = GBAApp::app()->getSaveFileName(this, tr("Select output file"), tr("Graphics Interchange Format (*.gif)"));
if (!filename.isEmpty()) {
m_ui.filename->setText(filename);
if (!FFmpegEncoderIsOpen(&m_encoder)) {
m_ui.start->setEnabled(true);
}
m_ui.filename->setText(filename);
}
void GIFView::setFilename(const QString& filename) {
m_filename = filename;
if (!FFmpegEncoderIsOpen(&m_encoder)) {
m_ui.start->setEnabled(!filename.isEmpty());
}
}
void GIFView::setFilename(const QString& fname) {
m_filename = fname;
}
#endif