mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
InputCommon: fix serialization of control expression with line breaks
The control expression editor allows line breaks, but the serialization was losing anything after the first line break (/r /n). Instead of opting to encode them and decode them on serialization (which I tried but was not safe, as it would lose /n written in the string by users), I opted to replace them with a space.
This commit is contained in:
@ -52,6 +52,8 @@ std::string_view StripQuotes(std::string_view s);
|
||||
|
||||
std::string ReplaceAll(std::string result, std::string_view src, std::string_view dest);
|
||||
|
||||
void ReplaceBreaksWithSpaces(std::string& str);
|
||||
|
||||
bool TryParse(const std::string& str, bool* output);
|
||||
|
||||
template <typename T, std::enable_if_t<std::is_integral_v<T> || std::is_enum_v<T>>* = nullptr>
|
||||
|
Reference in New Issue
Block a user