mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[util] Support encapsulated strings in configuration files
Fixes #1567.
This commit is contained in:
parent
6e5e50c359
commit
7f03f45301
@ -395,9 +395,19 @@ namespace dxvk {
|
||||
return;
|
||||
|
||||
// Extract the value
|
||||
bool insideString = false;
|
||||
n = skipWhitespace(line, n + 1);
|
||||
while (n < line.size() && !isWhitespace(line[n]))
|
||||
value << line[n++];
|
||||
|
||||
while (n < line.size()) {
|
||||
if (!insideString && isWhitespace(line[n]))
|
||||
break;
|
||||
|
||||
if (line[n] == '"') {
|
||||
insideString = !insideString;
|
||||
n++;
|
||||
} else
|
||||
value << line[n++];
|
||||
}
|
||||
|
||||
if (ctx.active)
|
||||
config.setOption(key.str(), value.str());
|
||||
|
Loading…
x
Reference in New Issue
Block a user