# Problems with SDL Macros

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

## 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 on other sites
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 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 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!

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 14
• 14
• 10
• 9
• 11
• ### Forum Statistics

• Total Topics
634096
• Total Posts
3015492
×