|
Allegro 4.2.1 keyboard routine not working after windows 10 update in june |
millo666
Member #17,228
December 2019
|
Hi! I am using Allegro 4.2.1 with Dev-C++ 5.0.0.0 with Windows 10 for a couple of years and it has worked fine. Strangely after the summer of 2019 the key function won't work properly. If i use key[KEY_R] or any other than key[KEY_ESC] the program won't react immediately, and you have to press that key many times to get it to trig, and sometimes it won't trig at all. Anyone that has a clue to why this is? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Allegro 4.2.1 is no longer under development. The latest version of Allegro 4 released was Allegro 4.4.2. The latest version in GIT is Allegro 4.4.3. Update from GIT. Try again. If that doesn't solve it, you're probably out of luck. :/ Edgar777 EDIT My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
millo666
Member #17,228
December 2019
|
Thank you very much Edgar. The thing is though that i am a total noob when it comes to building Allegro. I have only used it under Dev-C++ and would like to do so still. I used 4.2.1 with devpak and Dev-C++ 5.0.0.0 (cause the 4.9.9.2 didn't work under Windows 10). I tried updating to 4.4.2 using a devpak but i couldn't get it to work. There is no option for Allegro static or ALlegro DLL in that devpak. Regards, Lars |
Edgar Reynaldo
Major Reynaldo
May 2007
|
MinGW-W64 GCC 8.1 Posix Dwarf compiler Allegro 443 binaries : https://bitbucket.org/bugsquasher/unofficial-allegro-5-binaries/downloads/A443Deluxe.7z Ditch DevC++ and devpaks and learn how to use better tools like MinGW-W64 and CodeBlocks. That's the best advice I can give you. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
millo666
Member #17,228
December 2019
|
Thank you Edgar. I am aware of Dev-C++ but i'm so used to it and i have a C++ course at junior college where i use Dev-C++ with Allegro for simple 2d-graphics and of making 2d-games. Even if i decide to use Code-Blocks i have no clue how to implement ALlegro into it. Regards, Lars |
Edgar Reynaldo
Major Reynaldo
May 2007
|
If you expect to be a software developer that means you need to do a few things. 1) Learn new tools 2) Learn to debug There is a page for using Allegro 5 with CodeBlocks on the wiki here : https://wiki.allegro.cc/index.php?title=Windows,_Code::Blocks_and_Allegro_5 Replace that with the allegro libraries you need and you're good to go. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
millo666
Member #17,228
December 2019
|
No i am not a software developer. I have a basic C++ course and instead of teaching basic C++ in console mode, i wanted to use some graphics and i used allegro with Dev-C++ cause i am used to it. Also i am not given time as a teacher to learn new things sadly, but i'll have to do it this time. Thank you very much for your help Edgar. Regards, Lars |
Edgar Reynaldo
Major Reynaldo
May 2007
|
You're teaching C++ and you don't even know industry standard tools? Come on dude. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
millo666
Member #17,228
December 2019
|
I teach only the basics in C++. |
bamccaig
Member #7,536
July 2006
|
The original problem sounds like a bug in your code, not a bug in Allegro. Things are unlikely to just stop working like that when the code hasn't changed. It's unlikely that Microsoft would break an interface unless Allergro was using a deprecated one. I suggest the op post all of his code. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
torhu
Member #2,727
September 2002
|
Can you upload an executable for us to test? I think that Allegro 4.x uses DirectInput for keyboard input, and it's possible that noone else does that anymore. But it's also possible that the problem is just something completely different, including somewhere else in your code. |
millo666
Member #17,228
December 2019
|
Thank you guys for replying. It is not a bug in my code as i can test it on a "naked" allegro code, with only the game loop active. I have used Allegro 4.2.1 with Dev-C++ 5.0.0.0 for a couple of years with Windows 10, but after the summer it won't work. If i change while(key[KEY_ESC] to any other key, the program won't exit. I will post the code though. Here is an executable where i only changed while(key[KEY_ESC] to while(key[KEY_R] and the program won't exit. Regards Lars |
Edgar Reynaldo
Major Reynaldo
May 2007
|
We don't want an executable, we want source code. Post the minimum example that doesn't work. btw, I tried the program, and it doesn't do anything but stop responding to the OS. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
millo666
Member #17,228
December 2019
|
But that's the thing. You tried pressing "R"? It should then end the program, but it doesn't. Very well i'll put up the core allegro program but it has to be run under 5.0.0.0 Dev-C++ and windows 10 with all updates. When i install windows 10 fresh without updates it works. |
torhu
Member #2,727
September 2002
|
It does exit if I press for instance Space, then R. But hangs if I press just R. So it's likely to be a logic error in your code. I'm on the latest Windows 10, not that it should matter. |
millo666
Member #17,228
December 2019
|
You have the source code in my last reply. There's no logic error as you can see there. It's only the Allegro skeleteon code and the while(!key[KEY_ESC]) replaced with (!key[KEY_R]). Nothing works except ESC. |
torhu
Member #2,727
September 2002
|
Right. That's odd, can't see any obvious issues with that code. So I guess upgrading Allegro would be an idea... |
millo666
Member #17,228
December 2019
|
Yeah. Strange. I will try to do that. |
bamccaig
Member #7,536
July 2006
|
You should really be checking return values of every function that can fail. Whether or not you'd see an identifiable error prior to the crash I don't know, but nevertheless your program is sloppy not checking errors. There is a link in my signature to a wiki article that expands upon this. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
millo666
Member #17,228
December 2019
|
Ok, so my source code is sloppy, cause i didn't check for return values? It's like i said before, and like you can see if you download the file, that it is only the Allegro skeleton code with a different key trigger in the game-loop. If i check for return values i would see if the keyboard routines would initialize, and they do, in some way, but allegro 4.2.1 hasn't changed right, so it has to be something else I said that i have installed Windows 10 fresh with the same configuration; Dev-C++ 5.0.0.0 with Allegro 4.2.1 and it works flawlessly, but on computers with recently updated Windows 10 it doesn't. So should the logical thing be to think that something has changed in Windows 10 that ha caused this problem or not? That's my thought, and i hoped someone had some solution for it or some thought of might have happened. Regards, Lars |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Your source code works fine with MinGW-W64, Allegro 4.4.3, and the latest Windows 10 updates. So either your compiler is broken, or Allegro 4.2.1 is broken. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
millo666
Member #17,228
December 2019
|
Ok. Thanks Edgar, then that's it. I will change to 4.4.3.1 like i said earlier. Thanks for all your help, it has really made a difference. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Cheers. If you need help upgrading, let me know. Refer to those links and downloads I posted earlier if you need to. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
millo666
Member #17,228
December 2019
|
Thank you again, very helpful, i appreciate it so much. Regards, Lars |
|