Jump to content
  • Advertisement
Sign in to follow this  
rayli1107

Problems with SDL Macros

This topic is 4814 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've encountered a few problems with SDL's macros. I've just started using SDL, so I don't know if these are well-known... For example, on linux systems, the macros for left and right arrow keys are defined correctly. In fact, they are switched with each other. Also, the SDL_APPACTIVE (i think that's how it's spelled) also is not defined correctly, it's supposed to be 2 when it's defined to be 4. Anyone notices these problems?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
For example, on linux systems, the macros for left and right arrow keys are defined correctly. In fact, they are switched with each other.


What SDL version are you using? 1.2.9? Also, what package and kernel?

Quote:
Also, the SDL_APPACTIVE (i think that's how it's spelled) also is not defined correctly, it's supposed to be 2 when it's defined to be 4.


Well on the Windows Platform, in SDL_ACTIVE.h, it's defined as:

/* The available application states */
#define SDL_APPMOUSEFOCUS 0x01 /* The app has mouse coverage */
#define SDL_APPINPUTFOCUS 0x02 /* The app has input focus */
#define SDL_APPACTIVE 0x04 /* The application is active */

And it works fine, so where are you getting the information that it's supposed to be defined as 2?

Quote:
Anyone notices these problems?


What specific problems are you having? The whole point of the defines is that they can change and will not break anything when they are used. I don't use Linux, but I've never heard of anyone having problems with this functionality you are talking about, but I may be wrong. Can you explain some more please?

Share this post


Link to post
Share on other sites
whenever the program gets or loses focus, the SDL_APPACTIVE bit of the "state" value is nvr turned on, however SDL_APPINPUTFOCUS always is. Is there supposed to be a SDL_APPACTIVE event whenever the program loses focus, anyways?

I'm using 1.2.9, and I wasn't sure which Linux I was using, I just tested it quickly on a school computer and left. Windows doesn't have the left/right arrow button problem, tho.

Share this post


Link to post
Share on other sites
Ok I see what you are saying now. Sorry, but I don't think there's anything that you can do really. I've tried to find any issues online that mentioned these problems, but I've not come up with anything. I guess you will just have to work around that on those computers. Perhaps you could talk to the system admins and tell them about the issue to see if they can fix it somehow. Good luck!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!