Mousecursors in 4k Intros

category: code [glöplog]
Hi fellow 4k coders.

I know it's totally hard to get rid of the mousecursor in windows 7.
ShowCursor(0) alone doesn't work anymore in case you use the "standard" ugly mainloop with GetAsyncKeyState(VK_ESCAPE).

So here - two ways to fix it:
Code: //INIT ... ShowCursor(0); do { // do what you have to do... ... PeekMessageA(0, 0, 0, 0, PM_REMOVE); // <-- "fake" message handling. } while (!GetAsyncKeyState(VK_ESCAPE));

Or don't use GetAsyncKeystate but just PeekMessageA and check the message for keydown events.

Please fix your stuff. Thanks.
added on the 2012-04-10 09:42:19 by las las
added on the 2012-04-10 10:32:45 by gloom gloom
So true! I added that as a "bonus" line on the last slide of my seminar, although I didn't have time left to mention it. BTW, I didn't know you could use a 0 as the first parameter (the message pointer), that should save a byte or two.
added on the 2012-04-10 10:56:07 by Seven Seven
oh, come on
it has been done here long before you mentioned.. :)
added on the 2012-04-10 11:30:50 by nystep nystep
of course it has, but still, most people (including me) have been too lazy to fix it. :)
added on the 2012-04-10 11:56:15 by ferris ferris
Yes it has of course been solved and mentioned before - I wanted to point out that this still seems to be an issue.

Maybe this even should become part of the competition rules.
added on the 2012-04-10 12:30:04 by las las
Hey great! Thanks!
added on the 2012-04-10 12:42:05 by maytz maytz
Shouldn't this topic be called "Mousecursors in win7"? :)
With a broken implementation of ShowCursor(0) the bug is clearly in win7.
added on the 2012-04-10 13:22:54 by Digimind Digimind
The cursed cursor is also appearing in vista 64bit.
added on the 2012-04-10 13:27:37 by maytz maytz
http://www.autohotkey.com/community/viewtopic.php?t=2197 nomousy.exe, or as we called it: "hiirenpiilotuspaska"

At ASM/ALT we used this to hide the cursor all the time when showing the compo entries, did a batch file that had a looped "pause" that you could alttab and use to toggle the cursor on/off when needed.

Of course fixing it would be awesome but there are still so many that won't bother :p

Should at least work on all modern NT OS (XP/win7/vista/etc..)
added on the 2012-04-10 13:30:55 by oasiz oasiz
Not in case it's a competition rule.
added on the 2012-04-10 13:33:30 by las las
I vote for making it a compo-rule.
added on the 2012-04-10 13:50:29 by maytz maytz
maytz: done. At Solskogen 2012 you HAVE to hide the fucking mouse cursor. :)
added on the 2012-04-10 13:58:10 by gloom gloom
Oasiz: on some machines, not having a messageloop also causes a popup on the desktop with windows asking if it should shut down the unresponsive program. Meanwhile your intro shows a white screen and never recovers. I don't know if that program fixes that as well.

And besides, the fix only takes maybe 15 bytes after compression. At Revision, the majority of the 4Ks had this bug and the 2 4ks I've checked had plenty of space left to add this. I guess in most cases it's a matter of not knowing the fix.
added on the 2012-04-10 13:58:55 by Seven Seven
WHAT!!?? You have FUCKING mouse cursors in your OS'es? (I guess we'll adapt the rule as well, when we go through the compo-rules for next TRSAC)
added on the 2012-04-10 14:00:15 by Puryx Puryx
Gloom: Doh! ;)
added on the 2012-04-10 14:00:51 by maytz maytz
maytz: I guess you just lost a few bytes - and gained more of "what can I CUT!?" sessions ;)
added on the 2012-04-10 14:02:50 by Puryx Puryx
Pylle: yeah - REALLY great :)

While we are talking about it: I am planning to go to Solskogen this summer, and maybe bring a 1k/4k

...and back to topic!
added on the 2012-04-10 14:05:01 by maytz maytz
puryx: let's make it a joint-rule so it applies to both parties. I vote for this language:
If your entry is an executable program must hide the mouse cursor when running.

This especially applies to intros which has a tendency to skip it to save a few bytes. This lazy behavior will no longer be tolerated - try harder! If you don't hide the mouse cursor, we will hide it for you.

Yes, this includes handing out sheets of cardboard to Darklite to hold in front of the projector. So - do yourself (and us) a favor: hide the cursor!
added on the 2012-04-10 14:08:25 by gloom gloom
s/program must/program, you must
added on the 2012-04-10 14:09:07 by gloom gloom
Seven: nope, that is one big issue as well :(
Luckily pretty much all intros I have encountered I have managed to get recorded / shown with nomousy alone.
Definitely not a proper solution but works as a decent stopgap solution for organizers / recorders at the moment, It's those who have to deal with it at the parties (or recording it to youtube).
I would second a rule with this, it was very annoying at ASM10 since close to 50% of the intros had that issue, there wasn't enough time / resources to tell everybody to fix it as not that many still used win7 and it worked just fine in XP. This is where nomousy came to the rescue.
added on the 2012-04-10 14:09:54 by oasiz oasiz

If you don't hide the mouse cursor, we will hide it for you.

Yes, this includes handing out sheets of cardboard to Darklite to hold in front of the projector. So - do yourself (and us) a favor: hide the cursor!

added on the 2012-04-10 14:13:06 by las las
so that explain why all 4k intro during competition at Revision 2012 got that rotating circle over the intro :)
added on the 2012-04-10 14:16:43 by rez rez
Gloom: every executable programs seems quite harsh for 1K intros, but I don't know if that's a category at Solskogen.
added on the 2012-04-10 14:18:31 by Seven Seven