mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-24 04:08:10 +02:00
util: fix declaring drirc options as string
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41699>
This commit is contained in:
parent
428c9d64e5
commit
326d7eaa48
1 changed files with 6 additions and 3 deletions
|
|
@ -89,10 +89,13 @@ class DrircFloat(DrircOption):
|
|||
|
||||
class DrircString(DrircOption):
|
||||
def __init__(self, name, value=None, description="", c_name=None):
|
||||
super().__init__(DrircOptionType.STRING if value is not None else DrircOptionType.STRING_NODEF,
|
||||
"char *", name, description, c_name)
|
||||
dtype = DrircOptionType.STRING if value is not None else DrircOptionType.STRING_NODEF
|
||||
super().__init__(dtype, name, description, c_name)
|
||||
self.value = value
|
||||
self.c_args = [f"{value}", f"\"{self.description}\""]
|
||||
if value is not None:
|
||||
self.c_args = [f'"{value}"', f'"{self.description}"']
|
||||
else:
|
||||
self.c_args = [f'"{self.description}"']
|
||||
|
||||
class DrircEnumValue(object):
|
||||
def __init__(self, value, description=""):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue