all repos — mgba @ d33f1d13926f4aa2afebad31775222cdd278411c

mGBA Game Boy Advance Emulator

Qt: Fix GIF view not allowing manual filename entry
Vicki Pfau vi@endrift.com
Sun, 02 Feb 2020 16:05:27 -0800
commit

d33f1d13926f4aa2afebad31775222cdd278411c

parent

d2f205aa9e7fdf2de299e01e7fab649c2ad6dc51

2 files changed, 8 insertions(+), 9 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.cppsrc/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