forked from nerdunit/androidsideloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuestForm.cs
More file actions
52 lines (45 loc) · 2.13 KB
/
QuestForm.cs
File metadata and controls
52 lines (45 loc) · 2.13 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
using System;
using System.Windows.Forms;
namespace AndroidSideloader
{
public partial class QuestForm : Form
{
public QuestForm()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
bool ChangesMade = false;
//Quest 2 settings, might remove them in the future since some of them are broken
if (RefreshRateComboBox.SelectedIndex != -1)
{
ADB.RunAdbCommandToString($"shell setprop debug.oculus.refreshRate {RefreshRateComboBox.SelectedItem.ToString()}");
ADB.RunAdbCommandToString($"shell settings put global 90hz_global {RefreshRateComboBox.SelectedIndex}");
ADB.RunAdbCommandToString($"shell settings put global 90hzglobal {RefreshRateComboBox.SelectedIndex}");
ChangesMade = true;
}
if (TextureResTextBox.Text.Length>0)
{
Int32.TryParse(TextureResTextBox.Text, out int result);
ADB.RunAdbCommandToString($"shell settings put global texture_size_Global {TextureResTextBox.Text}");
ADB.RunAdbCommandToString($"shell settings put global texture_size_Global {TextureResTextBox.Text}");
ADB.RunAdbCommandToString($"shell setprop debug.oculus.textureWidth {TextureResTextBox.Text}");
ADB.RunAdbCommandToString($"shell setprop debug.oculus.textureHeight {TextureResTextBox.Text}");
ChangesMade = true;
}
if (CPUComboBox.SelectedIndex != -1)
{
ADB.RunAdbCommandToString($"shell setprop debug.oculus.cpuLevel {CPUComboBox.SelectedItem.ToString()}");
ChangesMade = true;
}
if (GPUComboBox.SelectedIndex != -1)
{
ADB.RunAdbCommandToString($"shell setprop debug.oculus.gpuLevel {GPUComboBox.SelectedItem.ToString()}");
ChangesMade = true;
}
if (ChangesMade)
MessageBox.Show("Settings applied!");
}
}
}