-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathHostSettingsPage.xaml.h
More file actions
121 lines (110 loc) · 4.66 KB
/
Copy pathHostSettingsPage.xaml.h
File metadata and controls
121 lines (110 loc) · 4.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
//
// HostSettingsPage.xaml.h
// Declaration of the HostSettingsPage class
//
#pragma once
#include "Pages\HostSettingsPage.g.h"
#include "State\ScreenResolution.h"
namespace moonlight_xbox_dx
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
[Windows::Foundation::Metadata::WebHostHidden]
public ref class HostSettingsPage sealed
{
private:
MoonlightHost^ host;
Windows::Foundation::Collections::IVector<ScreenResolution^>^ availableResolutions;
Windows::Foundation::Collections::IVector<int>^ availableFps;
Windows::Foundation::Collections::IVector<Platform::String^>^ availableAudioConfigs;
Windows::Foundation::Collections::IVector<Platform::String^>^ availableVideoCodecs;
Windows::Foundation::Collections::IVector<Platform::String^>^ availableFramePacing;
int currentResolutionIndex = 0;
int currentAppIndex = 0;
Windows::Foundation::EventRegistrationToken m_back_cookie;
protected:
virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
public:
HostSettingsPage();
property MoonlightHost^ Host {
MoonlightHost^ get() {
return this->host;
}
}
void OnBackRequested(Platform::Object^ e, Windows::UI::Core::BackRequestedEventArgs^ args);
property Windows::Foundation::Collections::IVector<ScreenResolution^>^ AvailableResolutions {
Windows::Foundation::Collections::IVector<ScreenResolution^>^ get() {
if (this->availableResolutions == nullptr)
{
this->availableResolutions = ref new Platform::Collections::Vector<ScreenResolution^>();
}
return this->availableResolutions;
}
}
property Windows::Foundation::Collections::IVector<int>^ AvailableFPS {
Windows::Foundation::Collections::IVector<int>^ get() {
if (this->availableFps == nullptr)
{
this->availableFps = ref new Platform::Collections::Vector<int>();
}
return this->availableFps;
}
}
property Windows::Foundation::Collections::IVector<Platform::String^>^ AvailableAudioConfigs {
Windows::Foundation::Collections::IVector<Platform::String^>^ get() {
if (this->availableAudioConfigs == nullptr)
{
this->availableAudioConfigs = ref new Platform::Collections::Vector<Platform::String^>();
}
return this->availableAudioConfigs;
}
}
property Windows::Foundation::Collections::IVector<Platform::String^>^ AvailableVideoCodecs {
Windows::Foundation::Collections::IVector<Platform::String^>^ get() {
if (this->availableVideoCodecs == nullptr)
{
this->availableVideoCodecs = ref new Platform::Collections::Vector<Platform::String^>();
}
return this->availableVideoCodecs;
}
}
property Windows::Foundation::Collections::IVector<Platform::String^>^ AvailableFramePacing {
Windows::Foundation::Collections::IVector<Platform::String^>^ get() {
if (this->availableFramePacing == nullptr)
{
this->availableFramePacing = ref new Platform::Collections::Vector<Platform::String^>();
}
return this->availableFramePacing;
}
}
property int CurrentResolutionIndex
{
int get() { return this->currentResolutionIndex; }
void set(int value) {
this->currentResolutionIndex = value;
}
}
property int CurrentAppIndex
{
int get() { return this->currentAppIndex; }
void set(int value) {
this->currentAppIndex = value;
}
}
private:
void backButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void ResolutionSelector_SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e);
void FPSSelector_SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e);
void BitrateInput_TextChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::TextChangedEventArgs^ e);
void AutoStartSelector_SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e);
void FramePacing_SelectionChanged(Platform::Object^ sender, Windows::UI::Xaml::Controls::SelectionChangedEventArgs^ e);
void EnableIdrIntervalCheckbox_Checked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
void EnableIdrIntervalCheckbox_Unchecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
void GlobalSettingsOption_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void BitrateInput_KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e);
void OnLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void OnUnloaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
int getDefaultBitrate(int width, int height, int fps);
};
}