gaks bug?

This is a discussion on gaks bug? within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I read that GetAsyncKeyState has a bug, hence DirectInput doesn't use it. I thought DI is higher-level than GAKS, not ...

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

    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?
    A class that doesn't overload all operators just isn't finished yet. -- SmugCeePlusPlusWeenie
    A year spent in artificial intelligence is enough to make one believe in God. -- Alan J. Perlis

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    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!
    CornedBee

    "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
    Posts
    3,189
    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.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  4. #4
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    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
    Posts
    3,189
    A dogpile by any other name...

    The issue remains the same.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

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

    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: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    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, 01:34 AM
  2. Debugging a rare / unreproducible bug..
    By g4j31a5 in forum A Brief History of Cprogramming.com
    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-20-2004, 11:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21