Sunshine v2025.118.151840
Self-hosted game stream host for Moonlight.
nvprefs_common.h
Go to the documentation of this file.
1
5#pragma once
6
7// sunshine utility header for generic smart pointers
8#include "src/utility.h"
9
10// winapi headers
11// disable clang-format header reordering
12// clang-format off
13#include <windows.h>
14#include <aclapi.h>
15// clang-format on
16
17namespace nvprefs {
18
19 struct safe_handle: public util::safe_ptr_v2<void, BOOL, CloseHandle> {
20 using util::safe_ptr_v2<void, BOOL, CloseHandle>::safe_ptr_v2;
21 explicit
22 operator bool() const {
23 auto handle = get();
24 return handle != NULL && handle != INVALID_HANDLE_VALUE;
25 }
26 };
27
29 void
30 operator()(void *p) {
31 LocalFree(p);
32 }
33 };
34
35 template <typename T>
37
39
40 void
41 info_message(const std::wstring &message);
42
43 void
44 info_message(const std::string &message);
45
46 void
47 error_message(const std::wstring &message);
48
49 void
50 error_message(const std::string &message);
51
53 bool opengl_vulkan_on_dxgi = true;
54 bool sunshine_high_power_mode = true;
55 };
56
58 get_nvprefs_options();
59
60} // namespace nvprefs
Definition utility.h:496
Definition nvprefs_common.h:52
Definition nvprefs_common.h:19
Definition nvprefs_common.h:28
Declarations for utility functions.