Skip to content

Commit

Permalink
FPS unlocker version: v2.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
sefinek committed Feb 13, 2023
1 parent 6fcfb4a commit 8b6d3ff
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 27 deletions.
2 changes: 1 addition & 1 deletion unlockfps_clr/AboutForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace unlockfpsclr {
this->labelTitle->Padding = System::Windows::Forms::Padding(0, 5, 0, 0);
this->labelTitle->Size = System::Drawing::Size(300, 44);
this->labelTitle->TabIndex = 0;
this->labelTitle->Text = L"Genshin FPS Unlocker\r\nv2.0.7";
this->labelTitle->Text = L"Genshin FPS Unlocker\r\nv2.0.8";
this->labelTitle->TextAlign = System::Drawing::ContentAlignment::TopCenter;
//
// linkLabelSource
Expand Down
24 changes: 16 additions & 8 deletions unlockfps_clr/MainForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,10 @@ namespace unlockfpsclr

Void MainForm::mainApp_Click(Object^ sender, EventArgs^ e)
{
if (File::Exists("C:\\Genshin-Impact-ReShade\\Data\\Cmd\\open.cmd")) {
Process::Start("C:\\Genshin-Impact-ReShade\\Data\\Cmd\\open.cmd");
}
else {
MessageBox::Show("Cannot find Genshin Impact Mod Pack.exe in: C:\\Genshin-Impact-ReShade\n\nPlease reinstall this mod using Genshin Impact ReShade Installer.", "Genshin Impact FPS Unlocker", MessageBoxButtons::OK, MessageBoxIcon::Warning);
if (File::Exists("C:\\Genshin-Impact-ReShade\\Data\\Cmd\\open-launcher.cmd")) {
Process::Start("C:\\Genshin-Impact-ReShade\\Data\\Cmd\\open-launcher.cmd");
} else {
MessageBox::Show("Cannot find a required file.\n\nPlease reinstall this mod using Genshin Impact Mod Setup.", "Genshin Impact FPS Unlocker", MessageBoxButtons::OK, MessageBoxIcon::Warning);
}
}

Expand All @@ -282,7 +281,7 @@ namespace unlockfpsclr
}
Void MainForm::githubMainRepo_Click(Object^ sender, EventArgs^ e)
{
Process::Start("https://github.com/sefinek24/genshin-impact-reshade-2023");
Process::Start("https://github.com/sefinek24/Genshin-Impact-ReShade");
}
Void MainForm::githubFpsUnlock_Click(Object^ sender, EventArgs^ e)
{
Expand All @@ -294,9 +293,18 @@ namespace unlockfpsclr
}

// Other
Void MainForm::CfgVersion_Click(Object^ sender, EventArgs^ e)
Void MainForm::viewCfg_Click(Object^ sender, EventArgs^ e)
{
if (File::Exists("C:\\Genshin-Impact-ReShade\\Data\\Unlocker\\unlocker.config.json")) {
Process::Start("C:\\Genshin-Impact-ReShade\\Data\\Unlocker\\unlocker.config.json");
} else {
MessageBox::Show("I can't find file with name unlocker.config.json.", "Genshin Impact FPS Unlocker", MessageBoxButtons::OK, MessageBoxIcon::Information);
}
}

Void MainForm::seeCurrentVersion_Click(Object^ sender, EventArgs^ e)
{
MessageBox::Show("Version: v" + settings->ConfigVersion + "\nDate: " + settings->ConfigDate, "Genshin Impact FPS Unlocker", MessageBoxButtons::OK, MessageBoxIcon::Information);
MessageBox::Show("Config version: v" + settings->ConfigVersion + "\nDate: " + settings->ConfigDate, "Genshin Impact FPS Unlocker", MessageBoxButtons::OK, MessageBoxIcon::Information);
}

// Void MainForm::ToolStipMenu_MouseEnter(Object^ sender, EventArgs^ e)
Expand Down
48 changes: 35 additions & 13 deletions unlockfps_clr/MainForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ namespace unlockfpsclr {
private: System::Windows::Forms::ToolStripMenuItem^ genshinFPSUnlockToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ myProfileToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ configVersionToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ viewConfigToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ seeCurrentVersionToolStripMenuItem;



Expand Down Expand Up @@ -139,6 +141,8 @@ namespace unlockfpsclr {
this->genshinFPSUnlockToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->myProfileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->configVersionToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->viewConfigToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->seeCurrentVersionToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->ttGamePath = (gcnew System::Windows::Forms::ToolTip(this->components));
this->notifyIcon = (gcnew System::Windows::Forms::NotifyIcon(this->components));
this->contextMenuNotify = (gcnew System::Windows::Forms::ContextMenuStrip(this->components));
Expand All @@ -152,7 +156,7 @@ namespace unlockfpsclr {
// btnStartGame
//
this->btnStartGame->BackColor = System::Drawing::Color::Transparent;
this->btnStartGame->Location = System::Drawing::Point(197, 82);
this->btnStartGame->Location = System::Drawing::Point(209, 87);
this->btnStartGame->Name = L"btnStartGame";
this->btnStartGame->Size = System::Drawing::Size(75, 23);
this->btnStartGame->TabIndex = 0;
Expand All @@ -166,7 +170,7 @@ namespace unlockfpsclr {
this->ckbAutoStart->AutoSize = true;
this->ckbAutoStart->BackColor = System::Drawing::Color::Transparent;
this->ckbAutoStart->ForeColor = System::Drawing::Color::White;
this->ckbAutoStart->Location = System::Drawing::Point(12, 86);
this->ckbAutoStart->Location = System::Drawing::Point(12, 90);
this->ckbAutoStart->Name = L"ckbAutoStart";
this->ckbAutoStart->Size = System::Drawing::Size(141, 17);
this->ckbAutoStart->TabIndex = 1;
Expand All @@ -185,11 +189,11 @@ namespace unlockfpsclr {
//
this->tbFPS->AutoSize = false;
this->tbFPS->Cursor = System::Windows::Forms::Cursors::Hand;
this->tbFPS->Location = System::Drawing::Point(12, 59);
this->tbFPS->Location = System::Drawing::Point(6, 64);
this->tbFPS->Maximum = 365;
this->tbFPS->Minimum = 12;
this->tbFPS->Name = L"tbFPS";
this->tbFPS->Size = System::Drawing::Size(260, 21);
this->tbFPS->Size = System::Drawing::Size(283, 21);
this->tbFPS->TabIndex = 2;
this->tbFPS->TabStop = false;
this->tbFPS->TickStyle = System::Windows::Forms::TickStyle::None;
Expand All @@ -200,7 +204,7 @@ namespace unlockfpsclr {
this->labelFPS->AutoSize = true;
this->labelFPS->BackColor = System::Drawing::Color::Transparent;
this->labelFPS->ForeColor = System::Drawing::Color::White;
this->labelFPS->Location = System::Drawing::Point(12, 37);
this->labelFPS->Location = System::Drawing::Point(12, 40);
this->labelFPS->Name = L"labelFPS";
this->labelFPS->Size = System::Drawing::Size(47, 13);
this->labelFPS->TabIndex = 3;
Expand All @@ -211,7 +215,7 @@ namespace unlockfpsclr {
this->inputFPS->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(47)), static_cast<System::Int32>(static_cast<System::Byte>(49)),
static_cast<System::Int32>(static_cast<System::Byte>(54)));
this->inputFPS->ForeColor = System::Drawing::Color::White;
this->inputFPS->Location = System::Drawing::Point(65, 34);
this->inputFPS->Location = System::Drawing::Point(77, 37);
this->inputFPS->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 365, 0, 0, 0 });
this->inputFPS->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 12, 0, 0, 0 });
this->inputFPS->Name = L"inputFPS";
Expand All @@ -226,11 +230,11 @@ namespace unlockfpsclr {
static_cast<System::Int32>(static_cast<System::Byte>(37)));
this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(4) {
this->toolStripMenuItem,
this->openToolStripMenuItem, this->linksToolStripMenuItem, this->configVersionToolStripMenuItem
this->openToolStripMenuItem, this->configVersionToolStripMenuItem, this->linksToolStripMenuItem
});
this->menuStrip1->Location = System::Drawing::Point(0, 0);
this->menuStrip1->Name = L"menuStrip1";
this->menuStrip1->Size = System::Drawing::Size(284, 24);
this->menuStrip1->Size = System::Drawing::Size(296, 24);
this->menuStrip1->TabIndex = 5;
this->menuStrip1->Text = L"menuStrip1";
//
Expand Down Expand Up @@ -376,11 +380,28 @@ namespace unlockfpsclr {
//
// configVersionToolStripMenuItem
//
this->configVersionToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {
this->viewConfigToolStripMenuItem,
this->seeCurrentVersionToolStripMenuItem
});
this->configVersionToolStripMenuItem->ForeColor = System::Drawing::Color::White;
this->configVersionToolStripMenuItem->Name = L"configVersionToolStripMenuItem";
this->configVersionToolStripMenuItem->Size = System::Drawing::Size(96, 20);
this->configVersionToolStripMenuItem->Text = L"Config version";
this->configVersionToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainForm::CfgVersion_Click);
this->configVersionToolStripMenuItem->Size = System::Drawing::Size(55, 20);
this->configVersionToolStripMenuItem->Text = L"Config";
//
// viewConfigToolStripMenuItem
//
this->viewConfigToolStripMenuItem->Name = L"viewConfigToolStripMenuItem";
this->viewConfigToolStripMenuItem->Size = System::Drawing::Size(180, 22);
this->viewConfigToolStripMenuItem->Text = L"View config";
this->viewConfigToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainForm::viewCfg_Click);
//
// seeCurrentVersionToolStripMenuItem
//
this->seeCurrentVersionToolStripMenuItem->Name = L"seeCurrentVersionToolStripMenuItem";
this->seeCurrentVersionToolStripMenuItem->Size = System::Drawing::Size(180, 22);
this->seeCurrentVersionToolStripMenuItem->Text = L"See current version";
this->seeCurrentVersionToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainForm::seeCurrentVersion_Click);
//
// ttGamePath
//
Expand Down Expand Up @@ -417,7 +438,7 @@ namespace unlockfpsclr {
this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
this->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(54)), static_cast<System::Int32>(static_cast<System::Byte>(57)),
static_cast<System::Int32>(static_cast<System::Byte>(63)));
this->ClientSize = System::Drawing::Size(284, 116);
this->ClientSize = System::Drawing::Size(296, 122);
this->Controls->Add(this->inputFPS);
this->Controls->Add(this->labelFPS);
this->Controls->Add(this->tbFPS);
Expand Down Expand Up @@ -460,7 +481,8 @@ namespace unlockfpsclr {
private: Void githubMyProfile_Click(Object^ sender, EventArgs^ e);
private: Void officialWebsite_Click(Object^ sender, EventArgs^ e);
private: Void youtube_Click(Object^ sender, EventArgs^ e);
private: Void CfgVersion_Click(Object^ sender, EventArgs^ e);
// private: Void ToolStipMenu_MouseEnter(Object^ sender, EventArgs^ e);
private: Void viewCfg_Click(Object^ sender, EventArgs^ e);
private: Void seeCurrentVersion_Click(Object^ sender, EventArgs^ e);
};
}
3 changes: 3 additions & 0 deletions unlockfps_clr/MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
<metadata name="ttAutoStart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ttAutoStart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>129, 17</value>
</metadata>
Expand Down
32 changes: 27 additions & 5 deletions unlockfps_clr/SettingsForm.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ namespace unlockfpsclr {
//
// labelAutoSave
//
this->labelAutoSave->Anchor = System::Windows::Forms::AnchorStyles::Bottom;
this->labelAutoSave->Anchor = System::Windows::Forms::AnchorStyles::None;
this->labelAutoSave->BackColor = System::Drawing::Color::Transparent;
this->labelAutoSave->Font = (gcnew System::Drawing::Font(L"Arial", 8.25F, System::Drawing::FontStyle::Bold));
this->labelAutoSave->ForeColor = System::Drawing::Color::White;
this->labelAutoSave->ForeColor = System::Drawing::Color::SkyBlue;
this->labelAutoSave->Location = System::Drawing::Point(16, 243);
this->labelAutoSave->Name = L"labelAutoSave";
this->labelAutoSave->Size = System::Drawing::Size(249, 14);
Expand All @@ -166,6 +166,7 @@ namespace unlockfpsclr {
//
// tabControl
//
this->tabControl->Anchor = System::Windows::Forms::AnchorStyles::None;
this->tabControl->Controls->Add(this->tabPageGeneral);
this->tabControl->Controls->Add(this->tabPageLaunchOptions);
this->tabControl->Controls->Add(this->tabPageDLLs);
Expand Down Expand Up @@ -194,6 +195,7 @@ namespace unlockfpsclr {
//
// comboPriority
//
this->comboPriority->Anchor = System::Windows::Forms::AnchorStyles::None;
this->comboPriority->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
this->comboPriority->FormattingEnabled = true;
this->comboPriority->Items->AddRange(gcnew cli::array< System::Object^ >(6) {
Expand All @@ -208,17 +210,19 @@ namespace unlockfpsclr {
//
// labelPriority
//
this->labelPriority->Anchor = System::Windows::Forms::AnchorStyles::None;
this->labelPriority->AutoSize = true;
this->labelPriority->BackColor = System::Drawing::Color::Transparent;
this->labelPriority->ForeColor = System::Drawing::Color::White;
this->labelPriority->Location = System::Drawing::Point(7, 104);
this->labelPriority->Location = System::Drawing::Point(5, 104);
this->labelPriority->Name = L"labelPriority";
this->labelPriority->Size = System::Drawing::Size(108, 13);
this->labelPriority->TabIndex = 4;
this->labelPriority->Text = L"Game process priority";
//
// ckbPowerSave
//
this->ckbPowerSave->Anchor = System::Windows::Forms::AnchorStyles::None;
this->ckbPowerSave->AutoSize = true;
this->ckbPowerSave->BackColor = System::Drawing::Color::Transparent;
this->ckbPowerSave->ForeColor = System::Drawing::Color::White;
Expand All @@ -234,6 +238,7 @@ namespace unlockfpsclr {
//
// ckbAutoClose
//
this->ckbAutoClose->Anchor = System::Windows::Forms::AnchorStyles::None;
this->ckbAutoClose->AutoSize = true;
this->ckbAutoClose->BackColor = System::Drawing::Color::Transparent;
this->ckbAutoClose->ForeColor = System::Drawing::Color::White;
Expand All @@ -248,6 +253,7 @@ namespace unlockfpsclr {
//
// ckbStartMinimized
//
this->ckbStartMinimized->Anchor = System::Windows::Forms::AnchorStyles::None;
this->ckbStartMinimized->AutoSize = true;
this->ckbStartMinimized->BackColor = System::Drawing::Color::Transparent;
this->ckbStartMinimized->ForeColor = System::Drawing::Color::White;
Expand All @@ -261,6 +267,7 @@ namespace unlockfpsclr {
//
// ckbVSync
//
this->ckbVSync->Anchor = System::Windows::Forms::AnchorStyles::None;
this->ckbVSync->AutoSize = true;
this->ckbVSync->BackColor = System::Drawing::Color::Transparent;
this->ckbVSync->ForeColor = System::Drawing::Color::White;
Expand Down Expand Up @@ -296,6 +303,7 @@ namespace unlockfpsclr {
//
// monitorNum
//
this->monitorNum->Anchor = System::Windows::Forms::AnchorStyles::None;
this->monitorNum->Location = System::Drawing::Point(111, 132);
this->monitorNum->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 1, 0, 0, 0 });
this->monitorNum->Name = L"monitorNum";
Expand All @@ -306,6 +314,7 @@ namespace unlockfpsclr {
//
// labelMonitorNum
//
this->labelMonitorNum->Anchor = System::Windows::Forms::AnchorStyles::None;
this->labelMonitorNum->AutoSize = true;
this->labelMonitorNum->BackColor = System::Drawing::Color::Transparent;
this->labelMonitorNum->ForeColor = System::Drawing::Color::White;
Expand All @@ -317,6 +326,7 @@ namespace unlockfpsclr {
//
// comboWindowMode
//
this->comboWindowMode->Anchor = System::Windows::Forms::AnchorStyles::None;
this->comboWindowMode->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
this->comboWindowMode->FormattingEnabled = true;
this->comboWindowMode->Items->AddRange(gcnew cli::array< System::Object^ >(2) { L"Borderless", L"Exclusive" });
Expand All @@ -329,6 +339,7 @@ namespace unlockfpsclr {
//
// labelWindowMode
//
this->labelWindowMode->Anchor = System::Windows::Forms::AnchorStyles::None;
this->labelWindowMode->AutoSize = true;
this->labelWindowMode->BackColor = System::Drawing::Color::Transparent;
this->labelWindowMode->ForeColor = System::Drawing::Color::White;
Expand All @@ -340,6 +351,7 @@ namespace unlockfpsclr {
//
// labelDummy
//
this->labelDummy->Anchor = System::Windows::Forms::AnchorStyles::None;
this->labelDummy->AutoSize = true;
this->labelDummy->BackColor = System::Drawing::Color::Transparent;
this->labelDummy->ForeColor = System::Drawing::Color::White;
Expand All @@ -351,6 +363,7 @@ namespace unlockfpsclr {
//
// customResY
//
this->customResY->Anchor = System::Windows::Forms::AnchorStyles::None;
this->customResY->Location = System::Drawing::Point(182, 77);
this->customResY->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 4320, 0, 0, 0 });
this->customResY->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 200, 0, 0, 0 });
Expand All @@ -361,6 +374,7 @@ namespace unlockfpsclr {
//
// customResX
//
this->customResX->Anchor = System::Windows::Forms::AnchorStyles::None;
this->customResX->Location = System::Drawing::Point(111, 77);
this->customResX->Maximum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 7680, 0, 0, 0 });
this->customResX->Minimum = System::Decimal(gcnew cli::array< System::Int32 >(4) { 200, 0, 0, 0 });
Expand All @@ -372,6 +386,7 @@ namespace unlockfpsclr {
//
// labelCustomRes
//
this->labelCustomRes->Anchor = System::Windows::Forms::AnchorStyles::None;
this->labelCustomRes->AutoSize = true;
this->labelCustomRes->BackColor = System::Drawing::Color::Transparent;
this->labelCustomRes->ForeColor = System::Drawing::Color::White;
Expand All @@ -383,6 +398,7 @@ namespace unlockfpsclr {
//
// ckbCustomRes
//
this->ckbCustomRes->Anchor = System::Windows::Forms::AnchorStyles::None;
this->ckbCustomRes->AutoSize = true;
this->ckbCustomRes->BackColor = System::Drawing::Color::Transparent;
this->ckbCustomRes->ForeColor = System::Drawing::Color::White;
Expand All @@ -396,6 +412,7 @@ namespace unlockfpsclr {
//
// ckbFullscreen
//
this->ckbFullscreen->Anchor = System::Windows::Forms::AnchorStyles::None;
this->ckbFullscreen->AutoSize = true;
this->ckbFullscreen->BackColor = System::Drawing::Color::Transparent;
this->ckbFullscreen->ForeColor = System::Drawing::Color::White;
Expand All @@ -409,6 +426,7 @@ namespace unlockfpsclr {
//
// ckbPopupWnd
//
this->ckbPopupWnd->Anchor = System::Windows::Forms::AnchorStyles::None;
this->ckbPopupWnd->AutoSize = true;
this->ckbPopupWnd->BackColor = System::Drawing::Color::Transparent;
this->ckbPopupWnd->ForeColor = System::Drawing::Color::White;
Expand Down Expand Up @@ -438,7 +456,8 @@ namespace unlockfpsclr {
//
// btnDllRemove
//
this->btnDllRemove->Location = System::Drawing::Point(136, 109);
this->btnDllRemove->Anchor = System::Windows::Forms::AnchorStyles::None;
this->btnDllRemove->Location = System::Drawing::Point(136, 115);
this->btnDllRemove->Name = L"btnDllRemove";
this->btnDllRemove->Size = System::Drawing::Size(107, 23);
this->btnDllRemove->TabIndex = 3;
Expand All @@ -449,7 +468,8 @@ namespace unlockfpsclr {
//
// btnDllAdd
//
this->btnDllAdd->Location = System::Drawing::Point(136, 75);
this->btnDllAdd->Anchor = System::Windows::Forms::AnchorStyles::None;
this->btnDllAdd->Location = System::Drawing::Point(136, 81);
this->btnDllAdd->Name = L"btnDllAdd";
this->btnDllAdd->Size = System::Drawing::Size(107, 23);
this->btnDllAdd->TabIndex = 2;
Expand All @@ -460,6 +480,7 @@ namespace unlockfpsclr {
//
// lbDllList
//
this->lbDllList->Anchor = System::Windows::Forms::AnchorStyles::None;
this->lbDllList->BackColor = System::Drawing::Color::FromArgb(static_cast<System::Int32>(static_cast<System::Byte>(32)), static_cast<System::Int32>(static_cast<System::Byte>(34)),
static_cast<System::Int32>(static_cast<System::Byte>(37)));
this->lbDllList->ForeColor = System::Drawing::Color::White;
Expand All @@ -472,6 +493,7 @@ namespace unlockfpsclr {
//
// labelDLLMessage
//
this->labelDLLMessage->Anchor = System::Windows::Forms::AnchorStyles::None;
this->labelDLLMessage->BackColor = System::Drawing::Color::Transparent;
this->labelDLLMessage->ForeColor = System::Drawing::Color::White;
this->labelDLLMessage->Location = System::Drawing::Point(0, 8);
Expand Down
Loading

0 comments on commit 8b6d3ff

Please sign in to comment.