Sunshine latest
Self-hosted game stream host for Moonlight.
nvprefs_common.h
Go to the documentation of this file.
1
5#pragma once
6
7// platform includes
8// disable clang-format header reordering
9// clang-format off
10#include <windows.h>
11#include <aclapi.h>
12// clang-format on
13
14// local includes
15#include "src/utility.h"
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
22 explicit operator bool() const {
23 auto handle = get();
24 return handle != NULL && handle != INVALID_HANDLE_VALUE;
25 }
26 };
27
29 void operator()(void *p) {
30 LocalFree(p);
31 }
32 };
33
34 template<typename T>
36
38
39 void info_message(const std::wstring &message);
40
41 void info_message(const std::string &message);
42
43 void error_message(const std::wstring &message);
44
45 void error_message(const std::string &message);
46
48 bool opengl_vulkan_on_dxgi = true;
49 bool sunshine_high_power_mode = true;
50 };
51
52 nvprefs_options get_nvprefs_options();
53
54} // namespace nvprefs
Definition utility.h:530
Definition nvprefs_common.h:47
Definition nvprefs_common.h:19
Definition nvprefs_common.h:28
Declarations for utility functions.