File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/libretro/drivers/options Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,15 @@ def get_variable(self, item: bytes) -> bytes | None:
72
72
value = self ._variables [key ]
73
73
else :
74
74
# Otherwise get the default value and save it to the dict
75
- value = string_at (self ._options_us [key ].default_value )
75
+ value = self ._options_us [key ].default_value
76
+ value = string_at (value ) if value is not None else None
76
77
self ._variables [key ] = value
78
+ return value
77
79
78
80
if value not in (string_at (v .value ) for v in self ._options_us [key ].values if v .value ):
79
81
# For invalid values, return None
80
- return string_at (self ._options_us [key ].default_value )
82
+ value = self ._options_us [key ].default_value
83
+ return string_at (value ) if value is not None else None
81
84
82
85
return self ._variables [key ]
83
86
You can’t perform that action at this time.
0 commit comments