Skip to content

Commit

Permalink
Add a 'compatibility warning' inside the Resolution tab
Browse files Browse the repository at this point in the history
- Add the red exclamation image into Resources
- Apply the compatibility flag for mgs2_sse.exe when applying settings
- Disable the 'Anti-aliasing' popup message inside graphics tab
  • Loading branch information
VFansss committed Aug 4, 2018
1 parent 6d2b483 commit 413cec4
Show file tree
Hide file tree
Showing 10 changed files with 209 additions and 83 deletions.
9 changes: 8 additions & 1 deletion mgs2 v's fix/ConfSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ public class ConfSheet
public Dictionary<string, string> Controls;
public Dictionary<string, string> Graphics;
public Dictionary<string, string> Sound;
public Dictionary<string, string> Others;



public ConfSheet()
{

Expand Down Expand Up @@ -61,6 +62,12 @@ public ConfSheet()

};

this.Others = new Dictionary<string, string>
{
{"CompatibilityWarningDisplayed",null},

};


}

Expand Down
32 changes: 32 additions & 0 deletions mgs2 v's fix/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 32 additions & 13 deletions mgs2 v's fix/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public Form1()

setNewBackground();

Ocelot.console("[+] Form1 constructor has done. Waiting user input.");
Ocelot.PrintToDebugConsole("[+] Form1 constructor has done. Waiting user input.");

// Bind lbl_checkForUpdate.Text to default text

Expand All @@ -95,14 +95,14 @@ private void btn_startGame_Click(object sender, EventArgs e)
{
Ocelot.startGame();

Ocelot.console("[+] Start game button pressed");
Ocelot.PrintToDebugConsole("[+] Start game button pressed");

}

private void btn_settings_Click(object sender, EventArgs e)
{

Ocelot.console("[ ] Settings button pressed");
Ocelot.PrintToDebugConsole("[ ] Settings button pressed");

// Check if INI contain all field and/or uncompiled fields

Expand Down Expand Up @@ -135,7 +135,7 @@ private void btn_settings_Click(object sender, EventArgs e)
return;
}

Ocelot.console("[ ] Settings - settings from internal config correctly attached to setupper");
Ocelot.PrintToDebugConsole("[ ] Settings - settings from internal config correctly attached to setupper");

// Settings Mode
btn_startGame.Visible = false;
Expand All @@ -157,14 +157,28 @@ private void btn_settings_Click(object sender, EventArgs e)

abt_Contacts.Checked = true;

Ocelot.console("[+] Settings has been displayed.");
// Must display the warning about winXP compatiblity?

if (!Ocelot.InternalConfiguration.Others["CompatibilityWarningDisplayed"].Equals("true"))
{
// Display it!

Ocelot.showMessage("compatibilityWarning");

// Not display anymore

Ocelot.InternalConfiguration.Others["CompatibilityWarningDisplayed"] = "true";

}

Ocelot.PrintToDebugConsole("[+] Settings has been displayed.");

}

private void btn_saveSettings_Click(object sender, EventArgs e)
{

Ocelot.console("[ ] Save button pressed");
Ocelot.PrintToDebugConsole("[ ] Save button pressed");

load_SetupperConfig_SetTo_InternalConfig();

Expand All @@ -187,15 +201,15 @@ private void btn_saveSettings_Click(object sender, EventArgs e)
pictureBox2.Visible = false;
lbl_ManualLink.Visible = false;

Ocelot.console("[+] Save has been saved (!)");
Ocelot.PrintToDebugConsole("[+] Save has been saved (!)");

}

private void btn_exit_Click(object sender, EventArgs e)
{
Application.Exit();

Ocelot.console("[+] Exit button pressed");
Ocelot.PrintToDebugConsole("[+] Exit button pressed");

}

Expand Down Expand Up @@ -266,12 +280,12 @@ public bool load_InternalConfig_SetTo_SetupperConfig()
if (lst_vga_list.SelectedIndex == -1)
{

Ocelot.console("[!] -VVV- No VGA Selected.");
Ocelot.PrintToDebugConsole("[!] -VVV- No VGA Selected.");

if (Ocelot.vgaList.Count == 0)
{

Ocelot.console("[!] -WHY?- No VGA found on system. Awaiting manual input.");
Ocelot.PrintToDebugConsole("[!] -WHY?- No VGA found on system. Awaiting manual input.");

// Strange case:
// V's wasn't able to understand which video cards are available
Expand All @@ -281,7 +295,7 @@ public bool load_InternalConfig_SetTo_SetupperConfig()

if (explicitedVGAName!= null && !explicitedVGAName.Equals("") && explicitedVGAName.Length > 0)
{
Ocelot.console("[!] -RESULT?- Found a manual inserted one: "+ explicitedVGAName);
Ocelot.PrintToDebugConsole("[!] -RESULT?- Found a manual inserted one: "+ explicitedVGAName);

// Manually inserted
lst_vga_list.Items.Add(explicitedVGAName);
Expand All @@ -292,7 +306,7 @@ public bool load_InternalConfig_SetTo_SetupperConfig()
{
// Prompt a message to V's Wiki

Ocelot.console("[!] -RESULT?- NO MANUAL INPUT. SHOWING MANUAL and ABORTING.");
Ocelot.PrintToDebugConsole("[!] -RESULT?- NO MANUAL INPUT. SHOWING MANUAL and ABORTING.");

Ocelot.showMessage("no_vga");

Expand Down Expand Up @@ -1415,6 +1429,11 @@ private void ptb_comPLAY_Click(object sender, EventArgs e)
}
}

private void help_compatibilityWarning_Click(object sender, EventArgs e)
{
Ocelot.showMessage("compatibilityWarning");
}

#endregion

#region UPDATE
Expand All @@ -1433,7 +1452,7 @@ private async void ptb_GitHubLogo_Click(object sender, EventArgs e)

UPDATE_checkInProgress = true;

lbl_checkForUpdate.Text = "Checking...";
lbl_checkForUpdate.Text = "...Checking...";

// Set the async
UPDATE_AVAILABILITY remoteStatus = await Task.Run(() => Ocelot.CheckForUpdatesAsync());
Expand Down
Loading

0 comments on commit 413cec4

Please sign in to comment.