Thread: Direct Input shutting down improperly

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    73

    Direct Input shutting down improperly

    Checklist
    Direct Input object created: YES.
    Direct Input device created: YES.
    Set data format: YES.
    Cooperative level: YES.
    Acquire: OH YEAH.
    Unacquire: NOPE.

    I am getting the DI_NOEFFECT return on the unaquire() call (I.e. device was never acquired in the first place) Obviously it was because I'm using it

    Only one reason why I can think this is happening.
    Code:
    g_InputDevice->SetCooperativeLevel(hWnd, DISCL_FOREGROUND | DISCL_EXCLUSIVE);
    DISCL_FOREGROUND will automatically cause the program to unacquire the device if the application goes to the background.

    Well.. as far as I know my application isn't going to the background. And even if it is... I'm still getting a crash when shutting down my application.

    Everything deallocated fine before dinput was added.. so its either the direct input object or direct input device causing the crash.

    Once again the code goes up.. everything needed to compile

    Also.. should I not be gathering checking for input all the time.. (i.e. should I put a specific timer on it to only check every second or something? Seems like the constant calls result in a lot of miniscule additions/subtractions for moving objects..

    (147k)
    www.deo.HostVan.com/DinputFailure.zip
    Last edited by Deo; 06-12-2005 at 08:21 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Input class project (again)
    By Elysia in forum C++ Programming
    Replies: 41
    Last Post: 02-13-2009, 10:52 AM
  2. I would love some input on my BST tree.
    By StevenGarcia in forum C++ Programming
    Replies: 4
    Last Post: 01-15-2007, 01:22 AM
  3. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 03:42 PM
  4. Structure and Linked List User Input Question
    By kevndale79 in forum C Programming
    Replies: 16
    Last Post: 10-05-2006, 11:09 AM
  5. Damnit Microsoft! Direct Input?!
    By Deo in forum Game Programming
    Replies: 4
    Last Post: 06-10-2005, 11:09 AM