Thread: gaks bug?

  1. #1
    Unregistered User Yarin's Avatar
    Join Date
    Jul 2007

    gaks bug?

    I read that GetAsyncKeyState has a bug, hence DirectInput doesn't use it. I thought DI is higher-level than GAKS, not to mention that's a huge bug to not be using something you made. Also, google only thinks the WINE GAKS has/had a bug. Is this true?

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    I doubt that any bug is the reason DI doesn't use GAKS. I'd say it's more about how DI bypasses the core Windows event handling, and how GAKS only allows you to query one key at a time, whereas DI has functions that return a bitmap for all key states at once.

    Also, a bug, in this function? Until you hear a more detailed description of what the bug is, don't believe it.

    It's very possible that WINE's GAKS had a bug. It's much less likely that it still has one. But in the case of WINE, it's easy to search their bug DB. A search for GetAsyncKeyState turns up three bugs. One seems to be irrelevant, the other two point to two bugs:
    1) GAKS's state table doesn't get updated when the program doesn't have focus. This is because X simply doesn't tell background programs about keyboard events, so WINE can't know the state. This bug is confirmed and open.
    2) GAKS doesn't report arrow keys. This bug is unconfirmed.
    All the buzzt!

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    The root of the problem is that GAKS under WINE isnt directly part of the OS's keyboard drivers. WINE is ultimately just a windows emulator.

  4. #4
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    On me hyperplane
    Actually WINE stands for: Wine Is Not an Emulator. Its a compatibility layer.

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    A dogpile by any other name...

    The issue remains the same.

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    I'm not sure I would want to give WINE'd programs full control over my keyboard for every application anyway . . . .

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell

    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ:

    My website:
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Zooming Algorithm Bug
    By stuffy_boiz in forum C Programming
    Replies: 2
    Last Post: 01-19-2009, 02:34 AM
  2. Debugging a rare / unreproducible bug..
    By g4j31a5 in forum A Brief History of
    Replies: 18
    Last Post: 08-05-2008, 12:56 PM
  3. ATL bug of CComPtr?
    By George2 in forum Windows Programming
    Replies: 6
    Last Post: 04-07-2008, 07:52 AM
  4. Some help with switch case bug...
    By hykyit in forum C Programming
    Replies: 5
    Last Post: 05-18-2005, 03:04 AM
  5. Annoying bug I can't find or fix!
    By homeyg in forum C++ Programming
    Replies: 3
    Last Post: 11-21-2004, 12:13 AM