Qt: Fix GIF view not allowing manual filename entry
Vicki Pfau vi@endrift.com
Sun, 02 Feb 2020 16:05:27 -0800
2 files changed,
8 insertions(+),
9 deletions(-)
M
CHANGES
→
CHANGES
@@ -27,6 +27,7 @@ - Qt: Fix crash unloading shaders
- 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
M
src/platform/qt/GIFView.cpp
→
src/platform/qt/GIFView.cpp
@@ -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& fname) { - m_filename = fname; +void GIFView::setFilename(const QString& filename) { + m_filename = filename; + if (!FFmpegEncoderIsOpen(&m_encoder)) { + m_ui.start->setEnabled(!filename.isEmpty()); + } } #endif