#pragma once // sunshine utility header for generic smart pointers #include "src/utility.h" // sunshine boost::log severity levels #include "src/main.h" // standard library headers #include #include #include #include #include #include #include #include // winapi headers // disable clang-format header reordering // clang-format off #include #include // clang-format on // nvapi headers // disable clang-format header reordering // clang-format off #include #include // clang-format on // boost headers #include namespace nvprefs { struct safe_handle: public util::safe_ptr_v2 { using util::safe_ptr_v2::safe_ptr_v2; explicit operator bool() const { auto handle = get(); return handle != NULL && handle != INVALID_HANDLE_VALUE; } }; struct safe_hlocal_deleter { void operator()(void *p) { LocalFree(p); } }; template using safe_hlocal = util::uniq_ptr, safe_hlocal_deleter>; using safe_sid = util::safe_ptr_v2; void info_message(const std::wstring &message); void info_message(const std::string &message); void error_message(const std::wstring &message); void error_message(const std::string &message); } // namespace nvprefs