Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Build and use Allegro 4.4.2 with Visual Studio 2013 32 and 64 bit [FIXED]

This thread is locked; no one can reply to it. rss feed Print
Build and use Allegro 4.4.2 with Visual Studio 2013 32 and 64 bit [FIXED]
Yamakuzure
Member #15,863
January 2015

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
Member #476
June 2000
avatar

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

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

SiegeLord
Member #7,827
October 2006
avatar

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

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Yamakuzure
Member #15,863
January 2015

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
Member #15,868
January 2015

Where can I find LowLevelHooksTimeout?

Erin Maus
Member #7,537
July 2006
avatar

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

---
ItsyRealm, a quirky 2D/3D RPG where you fight, skill, and explore in a medieval world with horrors unimaginable.
they / she

Andrew Gillett
Member #15,868
January 2015

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.

Go to: