Use ViGEm to create XBox 360 controller in C#



  • Mystery solved

    The thumb sticks need to be set between -32768 and 32767

    Which means it's now fully working!

    Bet you never thought I'd get there!

    Thanks for your help



  • Yeah that's a pitfall I'm gonna rectify in the upcoming version. Glad you got progress!



  • Hey all, I want to do the same sort of thing as lemmingDev.

    I cloned the ViGEm.NET project but can't get it to properly build. I run build.cmd and get this error:

    Could not find a part of the path 'C:\Users\myuser\Downloads\testwii\ViGEm.NET\build\bin\Release\bin\release\x64\ViGEmClient.dll'.

    Any ideas?



  • @craigrs84 Hey there! Thanks for the interest in building the project. I encourage you to jump into the discord for further support. Forums are slow and tedious while Discord is a lot more handy to help with. https://discord.vigem.org/



  • How do i add the missing xbox360 buttons? only these buttons are in the class:
    Up = 1,
    Down = 2,
    Left = 4,
    Right = 8,
    Start = 16,
    Back = 32,
    LeftThumb = 64,
    RightThumb = 128,
    LeftShoulder = 256,
    RightShoulder = 512,
    Guide = 1024,
    A = 4096,
    B = 8192,
    X = 16384,
    Y = 32768



  • @pejman Missing? Which class? Which branch?



  • namespace Nefarius.ViGEm.Client.Targets.Xbox360
    {
    [Flags]
    public enum Xbox360Buttons : ushort
    {
    Up = 1,
    Down = 2,
    Left = 4,
    Right = 8,
    Start = 16,
    Back = 32,
    LeftThumb = 64,
    RightThumb = 128,
    LeftShoulder = 256,
    RightShoulder = 512,
    Guide = 1024,
    A = 4096,
    B = 8192,
    X = 16384,
    Y = 32768
    }
    }

    i'm talking about the buttons when you hard press the joy sticks or 'up/right', 'up/left', and the rest of it.



  • You didn't mention the branch name so I'm guessing you're talking about outdated/legacy master.

    You mean L3 and R3? They are literally there; LeftThumb and RightThumb.

    6c4d9c51-5644-40ec-bd42-a54f022729db-image.png

    And please format code sections for better readability, thanks 😄



  • That is right, LeftThumb and RightThumb was the ones i was looking for, thanks for your response, i noticed combining buttons of directional pad also creates the up/left or up/right and so on. thank you again.



  • @pejman nice, btw. new API coming up is way less confusing so stick around!


Log in to reply