28 explicit operator bool()
const {
30 return handle !=
nullptr && handle != INVALID_HANDLE_VALUE;
Unique pointer wrapper with customizable pointer and deleter types.
Definition utility.h:814
pointer get()
Definition utility.h:952
void info_message(const std::wstring &message)
Forward an informational NVPrefs message to the logger.
Definition nvprefs_common.cpp:17
void error_message(const std::wstring &message)
Forward an NVPrefs error message to the logger.
Definition nvprefs_common.cpp:31
nvprefs_options get_nvprefs_options()
Get nvprefs options.
Definition nvprefs_common.cpp:45
util::uniq_ptr< std::remove_pointer_t< T >, safe_hlocal_deleter > safe_hlocal
Unique pointer for memory released with LocalFree.
Definition nvprefs_common.h:54
util::safe_ptr_v2< void, PVOID, &FreeSid > safe_sid
Safe pointer for Windows security identifiers released with FreeSid.
Definition nvprefs_common.h:59
Parsed command-line options for the NVIDIA preferences helper.
Definition nvprefs_common.h:92
bool sunshine_high_power_mode
Whether NVIDIA high-power mode should be enabled for Sunshine.
Definition nvprefs_common.h:94
bool opengl_vulkan_on_dxgi
Whether NVIDIA OpenGL/Vulkan-on-DXGI should be enabled.
Definition nvprefs_common.h:93
Owning Windows HANDLE wrapper that closes handles automatically.
Definition nvprefs_common.h:22
Deleter for memory allocated by Windows LocalAlloc APIs.
Definition nvprefs_common.h:37
void operator()(T *p) const
Free memory allocated by Windows local-memory APIs.
Definition nvprefs_common.h:45
Declarations for utility functions.
uniq_ptr< T, Destroy< T *, ReturnType, function > > safe_ptr_v2
Safe pointer wrapper for APIs whose release function returns a status value.
Definition utility.h:1597