Fix GIF rendering on older versions

This commit is contained in:
justburner 2022-02-21 18:07:34 +00:00 committed by manongjohn
parent 37ac349b9a
commit 2c2c458db1
3 changed files with 16 additions and 7 deletions

View file

@ -155,6 +155,8 @@ TLevelWriterGif::~TLevelWriterGif() {
}
#endif
preIArgs << "-r";
preIArgs << QString::number(framerate);
preIArgs << "-v";
preIArgs << "warning";
#if 0
@ -351,6 +353,9 @@ Tiio::GifWriterProperties::GifWriterProperties()
m_mode.setItemUIName(L"NEW3", tr("New Pal Per Frame + Bayer1 Dither"));
m_mode.setItemUIName(L"NOPAL", tr("Opaque, Dither, 256 Colors Only"));
// Doesn't make Generate Palette property visible in the popup
m_palette.setVisible(false);
bind(m_scale);
bind(m_looping);
bind(m_palette);

View file

@ -96,11 +96,15 @@ public:
std::string getId() const { return m_id; }
void setId(std::string id) { m_id = id; }
bool getVisible() const { return m_visible; }
void setVisible(bool state) { m_visible = state; }
private:
std::string m_name;
QString m_qstringName;
std::string m_id;
std::vector<Listener *> m_listeners;
bool m_visible;
};
//---------------------------------------------------------

View file

@ -75,17 +75,17 @@ FormatSettingsPopup::FormatSettingsPopup(QWidget *parent,
if (m_props) {
int i = 0;
for (i = 0; i < m_props->getPropertyCount(); i++) {
if (dynamic_cast<TEnumProperty *>(m_props->getProperty(i)))
TProperty *prop = m_props->getProperty(i);
if (prop && !prop->getVisible()) continue;
if (dynamic_cast<TEnumProperty *>(prop))
buildPropertyComboBox(i, m_props);
else if (dynamic_cast<TIntProperty *>(m_props->getProperty(i)))
else if (dynamic_cast<TIntProperty *>(prop))
buildValueField(i, m_props);
else if (dynamic_cast<TDoubleProperty *>(m_props->getProperty(i)))
else if (dynamic_cast<TDoubleProperty *>(prop))
buildDoubleField(i, m_props);
else if (dynamic_cast<TBoolProperty*>(m_props->getProperty(i))) {
if (m_props->getProperty(i)->getName() !=
"Generate Palette") // Hide. Not using but still needed here
else if (dynamic_cast<TBoolProperty *>(prop))
buildPropertyCheckBox(i, m_props);
} else if (dynamic_cast<TStringProperty*>(m_props->getProperty(i)))
else if (dynamic_cast<TStringProperty *>(prop))
buildPropertyLineEdit(i, m_props);
else
assert(false);