Go Back   Steam Users' Forums > Steam Game Discussions > M - P > Oddworld series

Reply
 
Thread Tools Display Modes
Old 03-19-2011, 11:22 PM   #46
v00d00man
 
 
 
Join Date: May 2008
Reputation: 109
Posts: 491
guys. cant you just recognise gamepads by VID & PID instead of "name" which could be different from os to os or from driver to driver??
v00d00man is offline   Reply With Quote
Old 03-24-2011, 11:09 AM   #47
Paul_cz
 
Join Date: Mar 2009
Reputation: 41
Posts: 562
I wonder if we can ever expect a patch that will fix this for good?
I provided the requested info on previous page..
Paul_cz is offline   Reply With Quote
Old 05-11-2011, 01:05 PM   #48
Paul_cz
 
Join Date: Mar 2009
Reputation: 41
Posts: 562
2 more months, the game still does not work correctly with wireless x360pad without tweaking.

Awesome support. You guys should look at Hydrophobia devs how it's done.
Paul_cz is offline   Reply With Quote
Old 06-18-2011, 02:21 PM   #49
Neebom
 
 
 
Banned
Join Date: Aug 2006
Reputation: 0
Posts: 290
For me the my 360 controller shows are "Controller (Xbox 360 Wireless Receiver for Windows)" and in device manager it shows as "Xbox 360 Wireless Receiver for Windows". It use to work properly and then after the update the mapping is all slightly off and when I did set the controls correctly they reverted after I quit and restarted the game.
Neebom is offline   Reply With Quote
Old 07-11-2011, 01:03 AM   #50
the_real_thing
 
Join Date: Sep 2010
Reputation: 0
Posts: 20
mine says afterglow... a la afterglow 360 controller lol
the_real_thing is offline   Reply With Quote
Old 04-11-2012, 05:17 AM   #51
geardaddy
 
Join Date: Nov 2004
Reputation: 4
Posts: 212
I just reinstalled Strangers Wrath...I am having controller troubles. I have a Xbox360 wired controller and the Launcher sees it as that: Controller (XBOX 360 For Windows). I have configed the controller for sensitivity...but my character spins and looks up and down without touching the controller...When I do start to move it is all over the place. I have tried all the ideas in this thread with no luck. The game use to work fine for me. I have reinstalled the xbox drivers. I have Windows 7 32 bit pro. i7 core 4 gigs ram...GTX 465 vid. card Any more help would be great. Thank you
.
geardaddy is offline   Reply With Quote
Old 08-17-2012, 03:54 PM   #52
squall_leonhart
 
Join Date: Jan 2010
Reputation: 91
Posts: 526
Quote:
To identify which Pad is hooked up we use the Windows name for the device.
Why are you identifying device capabilities by the products name string in the first place

the xinput documentation has a foolproof method for detecting xinput and enumerating the device correctly in the SDK documentation.

Code:
#include <wbemidl.h>
#include <oleauto.h>
#include <wmsstd.h>

//-----------------------------------------------------------------------------
// Enum each PNP device using WMI and check each device ID to see if it contains 
// "IG_" (ex. "VID_045E&PID_028E&IG_00").  If it does, then it's an XInput device
// Unfortunately this information can not be found by just using DirectInput 
//-----------------------------------------------------------------------------
BOOL IsXInputDevice( const GUID* pGuidProductFromDirectInput )
{
    IWbemLocator*           pIWbemLocator  = NULL;
    IEnumWbemClassObject*   pEnumDevices   = NULL;
    IWbemClassObject*       pDevices[20]   = {0};
    IWbemServices*          pIWbemServices = NULL;
    BSTR                    bstrNamespace  = NULL;
    BSTR                    bstrDeviceID   = NULL;
    BSTR                    bstrClassName  = NULL;
    DWORD                   uReturned      = 0;
    bool                    bIsXinputDevice= false;
    UINT                    iDevice        = 0;
    VARIANT                 var;
    HRESULT                 hr;

    // CoInit if needed
    hr = CoInitialize(NULL);
    bool bCleanupCOM = SUCCEEDED(hr);

    // Create WMI
    hr = CoCreateInstance( __uuidof(WbemLocator),
                           NULL,
                           CLSCTX_INPROC_SERVER,
                           __uuidof(IWbemLocator),
                           (LPVOID*) &pIWbemLocator);
    if( FAILED(hr) || pIWbemLocator == NULL )
        goto LCleanup;

    bstrNamespace = SysAllocString( L"\\\\.\\root\\cimv2" );if( bstrNamespace == NULL ) goto LCleanup;        
    bstrClassName = SysAllocString( L"Win32_PNPEntity" );   if( bstrClassName == NULL ) goto LCleanup;        
    bstrDeviceID  = SysAllocString( L"DeviceID" );          if( bstrDeviceID == NULL )  goto LCleanup;        
    
    // Connect to WMI 
    hr = pIWbemLocator->ConnectServer( bstrNamespace, NULL, NULL, 0L, 
                                       0L, NULL, NULL, &pIWbemServices );
    if( FAILED(hr) || pIWbemServices == NULL )
        goto LCleanup;

    // Switch security level to IMPERSONATE. 
    CoSetProxyBlanket( pIWbemServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, 
                       RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE );                    

    hr = pIWbemServices->CreateInstanceEnum( bstrClassName, 0, NULL, &pEnumDevices ); 
    if( FAILED(hr) || pEnumDevices == NULL )
        goto LCleanup;

    // Loop over all devices
    for( ;; )
    {
        // Get 20 at a time
        hr = pEnumDevices->Next( 10000, 20, pDevices, &uReturned );
        if( FAILED(hr) )
            goto LCleanup;
        if( uReturned == 0 )
            break;

        for( iDevice=0; iDevice<uReturned; iDevice++ )
        {
            // For each device, get its device ID
            hr = pDevices[iDevice]->Get( bstrDeviceID, 0L, &var, NULL, NULL );
            if( SUCCEEDED( hr ) && var.vt == VT_BSTR && var.bstrVal != NULL )
            {
                // Check if the device ID contains "IG_".  If it does, then it's an XInput device
                    // This information can not be found from DirectInput 
                if( wcsstr( var.bstrVal, L"IG_" ) )
                {
                    // If it does, then get the VID/PID from var.bstrVal
                    DWORD dwPid = 0, dwVid = 0;
                    WCHAR* strVid = wcsstr( var.bstrVal, L"VID_" );
                    if( strVid && swscanf( strVid, L"VID_%4X", &dwVid ) != 1 )
                        dwVid = 0;
                    WCHAR* strPid = wcsstr( var.bstrVal, L"PID_" );
                    if( strPid && swscanf( strPid, L"PID_%4X", &dwPid ) != 1 )
                        dwPid = 0;

                    // Compare the VID/PID to the DInput device
                    DWORD dwVidPid = MAKELONG( dwVid, dwPid );
                    if( dwVidPid == pGuidProductFromDirectInput->Data1 )
                    {
                        bIsXinputDevice = true;
                        goto LCleanup;
                    }
                }
            }   
            SAFE_RELEASE( pDevices[iDevice] );
        }
    }

LCleanup:
    if(bstrNamespace)
        SysFreeString(bstrNamespace);
    if(bstrDeviceID)
        SysFreeString(bstrDeviceID);
    if(bstrClassName)
        SysFreeString(bstrClassName);
    for( iDevice=0; iDevice<20; iDevice++ )
        SAFE_RELEASE( pDevices[iDevice] );
    SAFE_RELEASE( pEnumDevices );
    SAFE_RELEASE( pIWbemLocator );
    SAFE_RELEASE( pIWbemServices );

    if( bCleanupCOM )
        CoUninitialize();

    return bIsXinputDevice;
}


//-----------------------------------------------------------------------------
// Name: EnumJoysticksCallback()
// Desc: Called once for each enumerated joystick. If we find one, create a
//       device interface on it so we can play with it.
//-----------------------------------------------------------------------------
BOOL CALLBACK EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInstance,
                                     VOID* pContext )
{
    HRESULT hr;

    if( IsXInputDevice( &pdidInstance->guidProduct ) )
        return DIENUM_CONTINUE;

     // Device is verified not XInput, so add it to the list of DInput devices

     return DIENUM_CONTINUE;    
}

Last edited by squall_leonhart: 08-17-2012 at 04:02 PM.
squall_leonhart is offline   Reply With Quote
Old 10-02-2012, 02:31 PM   #53
citykids
 
Join Date: Sep 2009
Reputation: 0
Posts: 3
Unhappy

Quote:
Originally Posted by geardaddy View Post
I just reinstalled Strangers Wrath...I am having controller troubles. I have a Xbox360 wired controller and the Launcher sees it as that: Controller (XBOX 360 For Windows). I have configed the controller for sensitivity...but my character spins and looks up and down without touching the controller...When I do start to move it is all over the place. I have tried all the ideas in this thread with no luck. The game use to work fine for me. I have reinstalled the xbox drivers. I have Windows 7 32 bit pro. i7 core 4 gigs ram...GTX 465 vid. card Any more help would be great. Thank you
.

I'm having the very same problem, I thought I was the only one! On top of the spinning camera issue, when Stranger is in 1st-person mode, he is constantly punching even though none of the buttons are being pressed! Has anyone come up with a fix for this?!

thanks

Ok, after posting this I went into the control panel and reset the 360 pads's settings. When I restarted the game, everything cleared up!

Last edited by citykids: 10-02-2012 at 03:01 PM. Reason: Found a fix
citykids is offline   Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Game Discussions > M - P > Oddworld series


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -7. The time now is 05:56 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2012, All Rights Reserved.