Merge pull request #136 from StarryTony/master

Adjust controller parameters from the UI directly (by StarryTony)
This commit is contained in:
David Khachaturov 2019-04-16 15:38:43 +01:00 committed by GitHub
commit 533a3c89bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 328 additions and 67 deletions

View file

@ -5,8 +5,6 @@ VisualStudioVersion = 15.0.27130.2036
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BetterJoyForCemu", "BetterJoyForCemu\BetterJoyForCemu.csproj", "{1BF709E9-C133-41DF-933A-C9FF3F664C7B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ViGEmClient", "..\..\..\Downloads\ViGEm-master\ViGEm-master\NET\ViGEmClient\ViGEmClient.csproj", "{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -29,18 +27,6 @@ Global
{1BF709E9-C133-41DF-933A-C9FF3F664C7B}.Release|x64.Build.0 = Release|x64
{1BF709E9-C133-41DF-933A-C9FF3F664C7B}.Release|x86.ActiveCfg = Release|x86
{1BF709E9-C133-41DF-933A-C9FF3F664C7B}.Release|x86.Build.0 = Release|x86
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Debug|x64.ActiveCfg = Debug|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Debug|x64.Build.0 = Debug|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Debug|x86.ActiveCfg = Debug|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Debug|x86.Build.0 = Debug|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Release|Any CPU.Build.0 = Release|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Release|x64.ActiveCfg = Release|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Release|x64.Build.0 = Release|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Release|x86.ActiveCfg = Release|Any CPU
{AA18EBCF-7E9D-4BC5-8760-E8C6E9A773E5}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -43,6 +43,19 @@
<!-- Determines whether or not the program should purge the affected devices list upon exit -->
<!-- Should prevent any more issues of the controller being unusable after the program (even though this can be fixed if you read the README) -->
<!-- Default: true -->
<add key="PurgeAffectedDevices" value="true"/>
<add key="PurgeAffectedDevices" value="true" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
</configuration>

View file

@ -15,7 +15,8 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<PublishUrl>publish\</PublishUrl>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\X64\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
@ -25,10 +26,10 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>6.1.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@ -97,6 +98,24 @@
<PropertyGroup>
<ApplicationIcon>Icons\betterjoyforcemu_icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>4851FF155DC95EE211DC1C3DC4D481AF39F383BB</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>BetterJoyForCemu_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=3.3.1.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.3.1\lib\net40\Costura.dll</HintPath>
@ -152,9 +171,11 @@
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="BetterJoyForCemu_TemporaryKey.pfx" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<None Include="Properties\app.manifest" />
<None Include="Resources\bjfc.bmp" />
<None Include="FodyWeavers.xml" />
<Content Include="Icons\betterjoyforcemu_icon.ico" />
@ -193,13 +214,13 @@
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Fody.3.3.5\build\Fody.targets" Condition="Exists('..\packages\Fody.3.3.5\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.3.3.5\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.3.5\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.3.3.1\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.3.1\build\Costura.Fody.props'))" />
<Error Condition="!Exists('..\packages\Fielder.Fody.1.2.3\build\Fielder.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fielder.Fody.1.2.3\build\Fielder.Fody.props'))" />
<Error Condition="!Exists('..\packages\Fody.4.2.1\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.4.2.1\build\Fody.targets'))" />
</Target>
<Import Project="..\packages\Fody.4.2.1\build\Fody.targets" Condition="Exists('..\packages\Fody.4.2.1\build\Fody.targets')" />
</Project>

View file

@ -43,27 +43,36 @@
this.con2 = new System.Windows.Forms.Button();
this.con1 = new System.Windows.Forms.Button();
this.btnTip = new System.Windows.Forms.ToolTip(this.components);
this.foldLbl = new System.Windows.Forms.Label();
this.startInTrayBox = new System.Windows.Forms.CheckBox();
this.btn_open3rdP = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.rightPanel = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
this.contextMenu.SuspendLayout();
this.conCntrls.SuspendLayout();
this.groupBox1.SuspendLayout();
this.rightPanel.SuspendLayout();
this.SuspendLayout();
//
// console
//
this.console.Location = new System.Drawing.Point(12, 132);
this.console.Location = new System.Drawing.Point(18, 203);
this.console.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.console.Multiline = true;
this.console.Name = "console";
this.console.ReadOnly = true;
this.console.Size = new System.Drawing.Size(262, 100);
this.console.Size = new System.Drawing.Size(391, 152);
this.console.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(9, 116);
this.label1.Location = new System.Drawing.Point(14, 178);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 13);
this.label1.Size = new System.Drawing.Size(120, 20);
this.label1.TabIndex = 1;
this.label1.Text = "Console Output";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@ -80,36 +89,39 @@
//
// contextMenu
//
this.contextMenu.ImageScalingSize = new System.Drawing.Size(24, 24);
this.contextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.exitToolStripMenuItem});
this.contextMenu.Name = "contextMenu";
this.contextMenu.Size = new System.Drawing.Size(93, 26);
this.contextMenu.Size = new System.Drawing.Size(112, 34);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(92, 22);
this.exitToolStripMenuItem.Size = new System.Drawing.Size(111, 30);
this.exitToolStripMenuItem.Text = "Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// version_lbl
//
this.version_lbl.AutoSize = true;
this.version_lbl.Location = new System.Drawing.Point(246, 239);
this.version_lbl.Location = new System.Drawing.Point(369, 368);
this.version_lbl.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.version_lbl.Name = "version_lbl";
this.version_lbl.Size = new System.Drawing.Size(28, 13);
this.version_lbl.Size = new System.Drawing.Size(38, 20);
this.version_lbl.TabIndex = 2;
this.version_lbl.Text = "v6.0";
this.version_lbl.Text = "v6.1";
//
// passiveScanBox
//
this.passiveScanBox.AutoSize = true;
this.passiveScanBox.Checked = true;
this.passiveScanBox.CheckState = System.Windows.Forms.CheckState.Checked;
this.passiveScanBox.Location = new System.Drawing.Point(12, 238);
this.passiveScanBox.Location = new System.Drawing.Point(18, 366);
this.passiveScanBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.passiveScanBox.Name = "passiveScanBox";
this.passiveScanBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.passiveScanBox.Size = new System.Drawing.Size(91, 17);
this.passiveScanBox.Size = new System.Drawing.Size(130, 24);
this.passiveScanBox.TabIndex = 4;
this.passiveScanBox.Text = "Passive Scan";
this.passiveScanBox.UseVisualStyleBackColor = true;
@ -118,9 +130,10 @@
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(196, 239);
this.linkLabel1.Location = new System.Drawing.Point(294, 368);
this.linkLabel1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(42, 13);
this.linkLabel1.Size = new System.Drawing.Size(62, 20);
this.linkLabel1.TabIndex = 5;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "Donate";
@ -136,45 +149,51 @@
this.conCntrls.Controls.Add(this.con3);
this.conCntrls.Controls.Add(this.con2);
this.conCntrls.Controls.Add(this.con1);
this.conCntrls.Location = new System.Drawing.Point(12, 12);
this.conCntrls.Location = new System.Drawing.Point(18, 18);
this.conCntrls.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.conCntrls.Name = "conCntrls";
this.conCntrls.Size = new System.Drawing.Size(262, 100);
this.conCntrls.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.conCntrls.Size = new System.Drawing.Size(393, 154);
this.conCntrls.TabIndex = 0;
this.conCntrls.TabStop = false;
this.conCntrls.Text = "Connected Controllers";
//
// loc4
//
this.loc4.Location = new System.Drawing.Point(198, 80);
this.loc4.Location = new System.Drawing.Point(297, 123);
this.loc4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.loc4.Name = "loc4";
this.loc4.Size = new System.Drawing.Size(58, 20);
this.loc4.Size = new System.Drawing.Size(87, 31);
this.loc4.TabIndex = 7;
this.loc4.Text = "Locate";
this.loc4.UseVisualStyleBackColor = true;
//
// loc3
//
this.loc3.Location = new System.Drawing.Point(134, 80);
this.loc3.Location = new System.Drawing.Point(201, 123);
this.loc3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.loc3.Name = "loc3";
this.loc3.Size = new System.Drawing.Size(58, 20);
this.loc3.Size = new System.Drawing.Size(87, 31);
this.loc3.TabIndex = 6;
this.loc3.Text = "Locate";
this.loc3.UseVisualStyleBackColor = true;
//
// loc2
//
this.loc2.Location = new System.Drawing.Point(70, 80);
this.loc2.Location = new System.Drawing.Point(105, 123);
this.loc2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.loc2.Name = "loc2";
this.loc2.Size = new System.Drawing.Size(58, 20);
this.loc2.Size = new System.Drawing.Size(87, 31);
this.loc2.TabIndex = 5;
this.loc2.Text = "Locate";
this.loc2.UseVisualStyleBackColor = true;
//
// loc1
//
this.loc1.Location = new System.Drawing.Point(6, 80);
this.loc1.Location = new System.Drawing.Point(9, 123);
this.loc1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.loc1.Name = "loc1";
this.loc1.Size = new System.Drawing.Size(58, 20);
this.loc1.Size = new System.Drawing.Size(87, 31);
this.loc1.TabIndex = 4;
this.loc1.Text = "Locate";
this.loc1.UseVisualStyleBackColor = true;
@ -184,9 +203,10 @@
this.con4.BackgroundImage = global::BetterJoyForCemu.Properties.Resources.cross;
this.con4.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.con4.Enabled = false;
this.con4.Location = new System.Drawing.Point(198, 19);
this.con4.Location = new System.Drawing.Point(297, 29);
this.con4.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.con4.Name = "con4";
this.con4.Size = new System.Drawing.Size(58, 58);
this.con4.Size = new System.Drawing.Size(87, 89);
this.con4.TabIndex = 3;
this.con4.TabStop = false;
this.con4.UseVisualStyleBackColor = true;
@ -196,9 +216,10 @@
this.con3.BackgroundImage = global::BetterJoyForCemu.Properties.Resources.cross;
this.con3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.con3.Enabled = false;
this.con3.Location = new System.Drawing.Point(134, 19);
this.con3.Location = new System.Drawing.Point(201, 29);
this.con3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.con3.Name = "con3";
this.con3.Size = new System.Drawing.Size(58, 58);
this.con3.Size = new System.Drawing.Size(87, 89);
this.con3.TabIndex = 2;
this.con3.TabStop = false;
this.con3.UseVisualStyleBackColor = true;
@ -208,9 +229,10 @@
this.con2.BackgroundImage = global::BetterJoyForCemu.Properties.Resources.cross;
this.con2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.con2.Enabled = false;
this.con2.Location = new System.Drawing.Point(70, 19);
this.con2.Location = new System.Drawing.Point(105, 29);
this.con2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.con2.Name = "con2";
this.con2.Size = new System.Drawing.Size(58, 58);
this.con2.Size = new System.Drawing.Size(87, 89);
this.con2.TabIndex = 1;
this.con2.TabStop = false;
this.con2.UseVisualStyleBackColor = true;
@ -220,21 +242,35 @@
this.con1.BackgroundImage = global::BetterJoyForCemu.Properties.Resources.cross;
this.con1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.con1.Enabled = false;
this.con1.Location = new System.Drawing.Point(6, 19);
this.con1.Location = new System.Drawing.Point(9, 29);
this.con1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.con1.Name = "con1";
this.con1.Size = new System.Drawing.Size(58, 58);
this.con1.Size = new System.Drawing.Size(87, 89);
this.con1.TabIndex = 0;
this.con1.TabStop = false;
this.btnTip.SetToolTip(this.con1, "Click on Joycons to join/split them");
this.con1.UseVisualStyleBackColor = true;
//
// foldLbl
//
this.foldLbl.Location = new System.Drawing.Point(411, 27);
this.foldLbl.Margin = new System.Windows.Forms.Padding(4, 0, 0, 0);
this.foldLbl.Name = "foldLbl";
this.foldLbl.Size = new System.Drawing.Size(20, 328);
this.foldLbl.TabIndex = 12;
this.foldLbl.Text = ">";
this.foldLbl.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.btnTip.SetToolTip(this.foldLbl, "Config");
this.foldLbl.Click += new System.EventHandler(this.label2_Click);
//
// startInTrayBox
//
this.startInTrayBox.AutoSize = true;
this.startInTrayBox.Location = new System.Drawing.Point(107, 238);
this.startInTrayBox.Location = new System.Drawing.Point(160, 366);
this.startInTrayBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.startInTrayBox.Name = "startInTrayBox";
this.startInTrayBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.startInTrayBox.Size = new System.Drawing.Size(83, 17);
this.startInTrayBox.Size = new System.Drawing.Size(120, 24);
this.startInTrayBox.TabIndex = 6;
this.startInTrayBox.Text = "Start in Tray";
this.startInTrayBox.UseVisualStyleBackColor = true;
@ -242,19 +278,72 @@
//
// btn_open3rdP
//
this.btn_open3rdP.Location = new System.Drawing.Point(188, 112);
this.btn_open3rdP.Location = new System.Drawing.Point(282, 172);
this.btn_open3rdP.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.btn_open3rdP.Name = "btn_open3rdP";
this.btn_open3rdP.Size = new System.Drawing.Size(86, 20);
this.btn_open3rdP.Size = new System.Drawing.Size(129, 31);
this.btn_open3rdP.TabIndex = 7;
this.btn_open3rdP.Text = "Add Controllers";
this.btn_open3rdP.UseVisualStyleBackColor = true;
this.btn_open3rdP.Click += new System.EventHandler(this.btn_open3rdP_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.tableLayoutPanel1);
this.groupBox1.Location = new System.Drawing.Point(4, 16);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(340, 343);
this.groupBox1.TabIndex = 9;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Config";
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.AutoScroll = true;
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 25);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 1;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(328, 311);
this.tableLayoutPanel1.TabIndex = 1;
//
// rightPanel
//
this.rightPanel.Controls.Add(this.button1);
this.rightPanel.Controls.Add(this.groupBox1);
this.rightPanel.Location = new System.Drawing.Point(433, 2);
this.rightPanel.Margin = new System.Windows.Forms.Padding(3, 3, 18, 3);
this.rightPanel.Name = "rightPanel";
this.rightPanel.Size = new System.Drawing.Size(347, 388);
this.rightPanel.TabIndex = 11;
this.rightPanel.Visible = false;
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(247, 358);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(91, 30);
this.button1.TabIndex = 10;
this.button1.Text = "Apply";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 261);
this.AutoSize = true;
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.ClientSize = new System.Drawing.Size(859, 402);
this.Controls.Add(this.foldLbl);
this.Controls.Add(this.rightPanel);
this.Controls.Add(this.btn_open3rdP);
this.Controls.Add(this.startInTrayBox);
this.Controls.Add(this.conCntrls);
@ -265,6 +354,7 @@
this.Controls.Add(this.console);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.MaximizeBox = false;
this.Name = "MainForm";
this.Text = "BetterJoyForCemu";
@ -273,6 +363,8 @@
this.Resize += new System.EventHandler(this.MainForm_Resize);
this.contextMenu.ResumeLayout(false);
this.conCntrls.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.rightPanel.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -300,5 +392,10 @@
private System.Windows.Forms.ToolTip btnTip;
private System.Windows.Forms.CheckBox startInTrayBox;
private System.Windows.Forms.Button btn_open3rdP;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Panel rightPanel;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label foldLbl;
}
}

View file

@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
@ -21,6 +22,29 @@ namespace BetterJoyForCemu {
con = new List<Button> { con1, con2, con3, con4 };
loc = new List<Button> { loc1, loc2, loc3, loc4 };
//list all options
string[] myConfigs = ConfigurationManager.AppSettings.AllKeys;
Size childSize = new Size(87, 20);
for (int i = 0; i != myConfigs.Length; i++)
{
tableLayoutPanel1.RowCount++;
tableLayoutPanel1.Controls.Add(new Label() { Text = myConfigs[i], TextAlign=ContentAlignment.BottomLeft, AutoEllipsis=true, Size = childSize }, 0, i);
var value = ConfigurationManager.AppSettings[myConfigs[i]];
Control childControl;
if (value == "true" || value == "false")
{
childControl = new CheckBox() { Checked = Boolean.Parse(value), Size= childSize };
}
else
{
childControl = new TextBox() { Text = value, Size = childSize };
}
tableLayoutPanel1.Controls.Add(childControl, 1, i);
childControl.MouseClick += cbBox_Changed;
}
}
private void HideToTray() {
@ -175,6 +199,12 @@ namespace BetterJoyForCemu {
partyForm.ShowDialog();
}
private void button1_Click(object sender, EventArgs e)
{
Application.Restart();
Environment.Exit(0);
}
void ReenableXinput(Joycon v) {
if (showAsXInput) {
v.xin = new Xbox360Controller(Program.emClient);
@ -184,5 +214,40 @@ namespace BetterJoyForCemu {
v.report = new Xbox360Report();
}
}
private void label2_Click(object sender, EventArgs e)
{
rightPanel.Visible = !rightPanel.Visible;
foldLbl.Text = rightPanel.Visible ? "<" : ">";
}
private void cbBox_Changed(object sender, EventArgs e)
{
var coord = tableLayoutPanel1.GetPositionFromControl(sender as Control);
var valCtl = tableLayoutPanel1.GetControlFromPosition(coord.Column, coord.Row);
var KeyCtl = tableLayoutPanel1.GetControlFromPosition(coord.Column - 1, coord.Row).Text;
try
{
var configFile = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
var settings = configFile.AppSettings.Settings;
if (sender.GetType() == typeof(CheckBox) && settings[KeyCtl] != null)
{
settings[KeyCtl].Value = ((CheckBox)valCtl).Checked.ToString().ToLower();
}
else if (sender.GetType() == typeof(TextBox) && settings[KeyCtl] != null)
{
settings[KeyCtl].Value = ((TextBox)valCtl).Text.ToLower();
}
configFile.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection(configFile.AppSettings.SectionInformation.Name);
}
catch (ConfigurationErrorsException)
{
Console.WriteLine("Error writing app settings");
Trace.WriteLine(String.Format("rw {0}, column {1}, {2}, {3}", coord.Row, coord.Column, sender.GetType(), KeyCtl));
}
}
}
}

View file

@ -765,8 +765,8 @@
<metadata name="btnTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>247, 17</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
<metadata name="btnTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>247, 17</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View file

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
<defaultAssemblyRequest permissionSetReference="Custom" />
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
-->
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

View file

@ -3,6 +3,6 @@
<package id="Costura.Fody" version="3.3.1" targetFramework="net461" developmentDependency="true" />
<package id="Crc32.NET" version="1.2.0" targetFramework="net461" />
<package id="Fielder.Fody" version="1.2.3" targetFramework="net461" />
<package id="Fody" version="3.3.5" targetFramework="net461" developmentDependency="true" />
<package id="Fody" version="4.2.1" targetFramework="net461" developmentDependency="true" />
<package id="Nefarius.ViGEmClient" version="1.15.16" targetFramework="net461" />
</packages>

BIN
Examples/example1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 KiB

BIN
Examples/example2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
Examples/example3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
Examples/example4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

View file

@ -1,3 +1,12 @@
# BetterJoyForCemu v6.1 (based on v6 Nightly)
Automatically enumerate options and enable to control them directly from the UI. Any further options can be supported. -- by StarryTony
Click the arrow to open config panel.
Collapse | Expand
:-------------------------:|:-------------------------:
![Example](./Examples/example2.png)|![Example](./Examples/example3.png)
# BetterJoyForCemu v5 (v6 Nightly)
Allows the Nintendo Switch Pro Controller and Joycons to be used with [Cemu](http://cemu.info/) using [Cemuhook](https://sshnuke.net/cemuhook/), [Citra](https://citra-emu.org/), and system-wide with generic XInput support.
@ -83,15 +92,15 @@ Due to popular request (and my fear of releasing full builds without many new fe
# How to use
1. Install drivers
1. Run *! Driver Install (Run as Admin).bat*
1. Run BetterJoyForCemu.exe
2. Run BetterJoyForCemu.exe
1. If running for the first time, things might glitch out - just close BetterJoyForCemu normally and restart your computer for the drivers to take effect.
1. If not, see the __Problems__ section.
1. Connect your controllers.
1. Start Cemu and ensure CemuHook has the controller selected.
2. If not, see the __Problems__ section.
3. Connect your controllers.
4. Start Cemu and ensure CemuHook has the controller selected.
1. If using Joycons, CemuHook will detect two controllers - each will give all buttons, but choosing one over the other just chooses preference for which hand to use for gyro controls.
1. Go into *Input Settings*, choose XInput as a source and assign buttons normally.
5. Go into *Input Settings*, choose XInput as a source and assign buttons normally.
1. If you don't want to do this for some reason, just have one input profile set up with *Wii U Gamepad* as the controller and enable "Also use for buttons/axes" under *GamePad motion source*. **This is no longer required as of version 3**
1. Turn rumble up to 70-80% if you want rumble.
2. Turn rumble up to 70-80% if you want rumble.
* As of version 3, you can use the pro controller and Joycons as normal xbox controllers on your PC - try it with Steam!