this post was submitted on 26 May 2025
154 points (97.5% liked)

Programmer Humor

24874 readers
1232 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
all 12 comments
sorted by: hot top controversial new old
[–] nao@sh.itjust.works 31 points 1 month ago (1 children)
[–] towerful@programming.dev 28 points 1 month ago* (last edited 1 month ago) (1 children)

Trying to disable the windows key hotkey that opens the start menu, so the game The Witness can pause stuff, minimize, open the start menu and release the block on the windows key (IE do a more controlled start menu hotkey, instead of having windows rudely interrupt everything and break the game).

Started with a 5 second hang whenever a debug breakpoint was reached. The dev started digging into the issue.

Games use RawInput to get better mouse interactions, but that breaks the Microsoft recommended way of disabling windows key (as all input goes through RawInput instead of whatever the other windows API is).
In the documentation for RawInput, it specifically states the flag to disable the windows key doesn't work. So the Dev that was debugging the issue didn't try it. Until the next day when they had the realisation that MSDN windows API docs are garbage, tried the supposedly not-working flag and it actually did work.

The linked article is quite a good read, actually.
I had to use one of the mirrors in the SO answer

Edit:
The mirror I used https://caseymuratori.com/blog_0006

[–] dejected_warp_core@lemmy.world 11 points 1 month ago* (last edited 1 month ago) (1 children)

Until the next day when they had the realisation that MSDN windows API docs are garbage, tried the supposedly not-working flag and it actually did work.

This now leaves us with an uncomfortable question: is the real bug in the docs, or the API implementation? If it's the latter, it's at risk of being patched out since the behavior doesn't match the docs.

Edit: did a grammar.

[–] towerful@programming.dev 16 points 1 month ago

That's the fun part about windows: who the fuck knows?
Can't look at the source, can't confirm if it's bad API implementation or bad documentation.

[–] perishthethought@lemm.ee 12 points 1 month ago

And the next thing you know...

[–] Jumuta@sh.itjust.works 8 points 1 month ago

smh my head if the docs is untrustworthy just read the source

[–] SpaceNoodle@lemmy.world 7 points 1 month ago

Or any documentation. Or bug reports.

[–] tja@sh.itjust.works 5 points 1 month ago (1 children)
[–] sukhmel@programming.dev 3 points 1 month ago (1 children)

Source I found from a link on Stack overflow

Also, the could be better if it had alt text

[–] irelephant@programming.dev 2 points 1 month ago

I'm convinced at this point that the docs only exist to confuse WINE devs.

[–] Kojichan@lemmy.world 1 points 1 month ago

Luckily, I love snooping through the source code and reverse engineering how functions and.code works and figure it out that way.