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



  • 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.



  • 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



  • @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



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



  • @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
    		}
    	}
    


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




Log in to reply