Query SDL for available texture renderers
There's no point in hardcoding these values - they can be different to every user (it depends on hardware, OS, SDL version, etc). Also, future versions of SDL might introduce more renderers, so this way the code is more future-proof.
This commit is contained in:
parent
6ce7ff8b58
commit
a7280cf1f7
3 changed files with 25 additions and 14 deletions
|
@ -508,6 +508,14 @@ void Property::Set_values(const char * const *in) {
|
|||
}
|
||||
}
|
||||
|
||||
void Property::Set_values(const std::vector<std::string> & in) {
|
||||
Value::Etype type = default_value.type;
|
||||
for (auto &str : in) {
|
||||
Value val(str, type);
|
||||
suggested_values.push_back(val);
|
||||
}
|
||||
}
|
||||
|
||||
Prop_int* Section_prop::Add_int(string const& _propname, Property::Changeable::Value when, int _value) {
|
||||
Prop_int* test=new Prop_int(_propname,when,_value);
|
||||
properties.push_back(test);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue