Build and use Allegro 4.4.2 with Visual Studio 2013 32 and 64 bit [FIXED]
Yamakuzure

Hi everybody,

I am currently working on a game that uses allegro 4. To test the changes I made within the last 12 months on Windows, I needed to compile allegro-4.4.2 using Visual Studio 2013.

That did not work right out of the box. Maybe you have heard, maybe not, it simply does not compile at all.

So I fixed the issues and had four sets of libraries. (32/64 bit, Debug and Release)

Everything went well, until I tried to test the 64bit build of my program. Worked well, too, but only if started from the Visual Studio Debugger. When started from Explorer, the game opened a window and Windows complained that it was no longer working.

But I am stubborn and *do* - *want* - *that* - *64bit* - *version* ! ::)

Gladly I can say that I found the issue and fixed it.

But : How can I know that I didn't just fix it for my specific setup and needs?

Therefore I opened Patch Ticket #62 to upload the patches.

So if anybody is (or was) in the same situation, needing to build allegro-4.4.2 with Visual Studio 2010/2012/2013 in 64bit, please try out my patches.
Link: #62 Fix Allegro-4.4.2 on Win7 with Visual Studio 2013, Kit 8.0

Allegro 4 is deprecated, as far as I understand it, and those patches won't make it into any new release, I bet. ;)

Thomas Fjellstrom

If there was ever a reason to release an update to 4.4, critical crash bugs would be it.

SiegeLord

I understand most of the patch, but one bit confuses me... what's up with the GUID_SysMouseEm2 and GUID_SysKeyboardEm2?

Yamakuzure

That was my feeble attempt to use the emulation layer so Visual Studio would still be usable on break points.

Long story short:
Allegro grabs the system keyboard and mouse. So when the game crashes or reaches a breakpoint, the IDE pops up, but all mouse movements and keyboard events have a several seconds lag because the allegro handlers simply do not answer. Mouse buttons do not work at all. Imagine to single step like that.

Even with LowLevelHooksTimeout set to 300ms (instead of 5000ms default) it is all a crawl.

However, although this did not fix anything, it doesn't seem to make a difference whether to use GUID_SysMouse, GUID_SysMouseEm or GUID_SysMouseEm2. I simply didn't bother to change it back. (Lazy me, yes...)

Andrew Gillett

Where can I find LowLevelHooksTimeout?

Erin Maus

LowLevelHooksTimeout is a registry key located at HKEY_CURRENT_USER\Control Panel\Desktop. The value is in milliseconds.

Andrew Gillett

LowLevelHooksTimeout doesn't exist on my PC (Windows 7 Ultimate), either in the specified location or anywhere else in the registry. I tried adding it and setting it to a low number, but it made no difference.

Thread #615012. Printed from Allegro.cc