Skip to content

Commit 8b13cbd

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents cf8c011 + 72d595c commit 8b13cbd

File tree

1 file changed

+5
-2
lines changed
  • src/libretro/drivers/options

1 file changed

+5
-2
lines changed

src/libretro/drivers/options/dict.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,15 @@ def get_variable(self, item: bytes) -> bytes | None:
7272
value = self._variables[key]
7373
else:
7474
# 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
7677
self._variables[key] = value
78+
return value
7779

7880
if value not in (string_at(v.value) for v in self._options_us[key].values if v.value):
7981
# 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
8184

8285
return self._variables[key]
8386

0 commit comments

Comments
 (0)