79724269

Date: 2025-08-03 19:14:16
Score: 0.5
Natty:
Report link

i am still geting 0 , even if i try to run as admin, getled, forcefeedback etc working but not showing wheel axis

enter image description here

#include <iostream>
#include <windows.h>
#include <map>
#include <dinput.h>
#include <string>
#include <algorithm>
#pragma comment(lib, "LogitechSteeringWheelLib.lib")
#include "LogitechSteeringWheelLib.h"

int main()
{
    DIJOYSTATE2* controller_state = NULL;
    DIJOYSTATE2ENGINES* last_state = NULL;
    std::map<std::string, int> current_state_map;
    int controller_idx = 0;
    HWND h_wnd = GetConsoleWindow();
    int range = 300;



 

    while (!LogiSteeringInitializeWithWindow(true, h_wnd)) {
        printf("try again.\n");
    }
    const int deadZone = 500;
    while (true) {
        if (!LogiUpdate()) {
            continue;
        }
       
        while (LogiIsConnected(controller_idx)) {
            
            LogiSteeringInitialize(true);
            std::cout << LOGI_MAX_CONTROLLERS << std::endl;
            wchar_t deviceName[128];
            LogiGetFriendlyProductName(controller_idx, deviceName, 128);
           
            if (LogiIsDeviceConnected(controller_idx, LOGI_DEVICE_TYPE_WHEEL) == 1)
            {
                std::cout << LogiIsModelConnected(controller_idx,  LOGI_MODEL_G29) << std::endl;;
                std::wcout << deviceName << " \ndevice id " << controller_idx << std::endl;
               
               
             
                
                // Read current wheel position
                controller_state = LogiGetState(controller_idx);
                last_state = LogiGetStateENGINES(controller_idx);

                std::cout << "-------------" << std::endl;
                std::cout << controller_state->lX << std::endl;
                std::cout << controller_state->lY << std::endl;
                std::cout << controller_state->lRz << std::endl;
                std::cout << "-------------" << std::endl;
                std::cout << last_state->lX << std::endl;
                std::cout << last_state->lY << std::endl;
                std::cout << last_state->lRz << std::endl;
                std::cout << "-------------" << std::endl;
                system("cls");

               
                system("cls");
                


            }
          


        }
        std::cout << "unconnected\n";
        LogiSteeringShutdown();
        return 0;

    }

}

enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user8672267