๐ฅ๏ธ Platform Helper Macros
Short Description
Small macros to make platform-specific code more readable by selecting between Windows and non-Windows implementations.
Long Description
These macros expand to either the Windows-specific branch or a fallback depending on the PLATFORM_WINDOWS compile-time symbol. They keep short conditional code compact and avoid repeated #if PLATFORM_WINDOWS scaffolding.
๐ Macros
GORGEOUS_WINDOWS(This, Other)
Expands to This when compiling on Windows, otherwise expands to Other.
auto Path = GORGEOUS_WINDOWS(TEXT("C:\\ProgramData"), TEXT("/var/lib"));
GORGEOUS_WINDOWS_ONLY(...)
Expands to the provided code only when compiling for Windows; expands to nothing on other platforms.
GORGEOUS_WINDOWS_ONLY(
// Windows-only initialization
InitWindowsFeature();
)
Where to find the macros
src/content/gorgeous-core/RuntimeUtilities/Helpers/Headers/Macros/GorgeousPlatformHelperMacros.h