Add audio settings

This commit is contained in:
Dan Paulat 2023-11-29 06:05:35 -06:00
parent 9486d2364a
commit ec97231bca
6 changed files with 206 additions and 3 deletions

View file

@ -0,0 +1,20 @@
#pragma once
#define SCWX_SETTINGS_ENUM_VALIDATOR(Type, Iterator, ToName) \
[](const std::string& value) \
{ \
for (Type enumValue : Iterator) \
{ \
/* If the value is equal to a lower case name */ \
std::string enumName = ToName(enumValue); \
boost::to_lower(enumName); \
if (value == enumName) \
{ \
/* Regard as a match, valid */ \
return true; \
} \
} \
\
/* No match found, invalid */ \
return false; \
}