Closed Alcaro closed 9 years ago
Why have a RETRO_VARIABLE_TYPE_TERMINATOR instead of just ending the variable list with a NULL pointer ? Why use a string with \n separator for RETRO_VARIABLE_TYPE_ENUM instead of an array of string ? Shouldn't there be a bool type also ? I know this could also be done with the enum type, but a separate bool type would allow the frontend to do i18n on the yes/no choice or even render it with a custom widget (e.g a checkbox). Also, the RETRO_VARIABLE_TYPE_SEPARATOR type feels a bit weird to me...
1) Because separators are supposed to use NULL for everything, making them impossible to differentiate from the terminator. I've made sure TYPE_TERMINATOR==0, so you can use while (obj->field). (I seem to have forgotten the dummy==INT_MAX, though.) 2) It's modeled after the original core options, which separate them with |. But yeah, now that I think about it, neither makes sense. 3) Considering I actually pick apart yes/no options in my own front, yes, I should've thought of that. Maybe some options fit better as yes/no and some fit better as enable/disable, but we won't lose too much on forcing them into the same set of strings. 4) A front will work if it doesn't render them; it just feels a bit more organized to group them if they're many. Most cores won't need it, but Snes9X has 13 different options for layer and sound channel toggles, and maybe a few others.
Blocks: #8
Proposed replacement:
Any opinions? Suggestions? Face-melting wrath?