Navigation

    ViGEm Forums

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Twitter
    • GitHub
    • Discord

    PPSSPP XInput Nefarius.ViGEm.Client.dll can't get it to work

    Discussion and Support
    2
    7
    64
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jmoseman01 last edited by nefarius

      Note: edited by moderator for readability.

      using System;
      using Nefarius.ViGEm.Client;
      using Nefarius.ViGEm.Client.Targets;
      using Nefarius.ViGEm.Client.Targets.Xbox360;
      
      namespace ConsoleApp1
      {
          class Program
          {
              static void Main(string[] args)
              {
                  Console.WriteLine("Hello World!");
                  ViGEmClient viGEmClient = new ViGEmClient();
                  IXbox360Controller quasiXboxController = viGEmClient.CreateXbox360Controller();
                  quasiXboxController.Connect();
                  quasiXboxController.SetAxisValue(Xbox360Axis.LeftThumbX,3000);
                  viGEmClient.Dispose();
      
              }
          }
      }
      

      I'm trying the code above but I'm unable to move death jr on the screen programatically.

      J 1 Reply Last reply Reply Quote 0
      • J
        jmoseman01 @jmoseman01 last edited by nefarius

        Note: edited by moderator for readability.

        using System.Threading;
        using Nefarius.ViGEm.Client;
        using Nefarius.ViGEm.Client.Targets;
        using Nefarius.ViGEm.Client.Targets.Xbox360;
        
        namespace ConsoleApp1
        {
            class Program
            {
                static void Main(string[] args)
                {
                    ViGEmClient client = new ViGEmClient();
        
                    IXbox360Controller controller = client.CreateXbox360Controller();
        
                    controller.Connect();
        
                    //minimum of -32768, maximum of 32767
                    controller.SetAxisValue(Xbox360Axis.LeftThumbY, 1000);
        
                    Thread.Sleep(5000);
        
                }
            }
        }
        

        I was able to run the code above but had problems hooking into ppsspp

        nefarius 1 Reply Last reply Reply Quote 0
        • nefarius
          nefarius @jmoseman01 last edited by

          @jmoseman01 said in PPSSPP XInput Nefarius.ViGEm.Client.dll can't get it to work:

          I was able to run the code above but had problems hooking into ppsspp

          There is no "hooking" when using ViGEm. It creates a system-wide controller like the real hardware and takes inputs via the API like demonstrated in the code snippet. Nothing more, nothing less.

          If there are issues with that you'd need to be way more specific. "had problems" can mean literally anything.

          Cheers

          J 1 Reply Last reply Reply Quote 0
          • J
            jmoseman01 @nefarius last edited by

            @nefarius I got it to work with XInput Tester but it won't work with ppsspp.

            1 Reply Last reply Reply Quote 0
            • J
              jmoseman01 last edited by nefarius

              @jmoseman01 said in PPSSPP XInput Nefarius.ViGEm.Client.dll can't get it to work:

              @nefarius I got it to work with XInput Tester but it won't work with ppsspp.

              ppsspp uses xinput1_4.dll

              s_pXInputDLL = LoadLibrary( L"XInput1_4.dll" );  // 1.4 Ships with Windows 8.
              	if (!s_pXInputDLL) {
              		version = (1 << 16) | 3;
              		s_pXInputDLL = LoadLibrary( L"XInput1_3.dll" );  // 1.3 Ships with Vista and Win7, can be installed as a restributable component.
              		if (!s_pXInputDLL) {
              			version = (1 << 16) | 0;
              			s_pXInputDLL = LoadLibrary( L"XInput9_1_0.dll" );  // 1.0 ships with any Windows since WinXP
              		}
              	}
              
              1 Reply Last reply Reply Quote 0
              • J
                jmoseman01 last edited by

                I posted a youtube video on what's going on - https://www.youtube.com/watch?v=EngEEFEUyXw

                1 Reply Last reply Reply Quote 0
                • nefarius
                  nefarius last edited by

                  I answered on the GitHub issue.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post