Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Use a typedef instead of a #define, to handle syntax like: SDL_Textur…
Browse files Browse the repository at this point in the history
…eID a, b
  • Loading branch information
slouken committed Jan 2, 2011
1 parent c9d0145 commit fcff670
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/SDL_compat.h
Expand Up @@ -327,8 +327,9 @@ extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);

#define SDL_TextureID SDL_Texture*
#define SDL_WindowID SDL_Window*
typedef SDL_Texture* SDL_TextureID;
typedef SDL_Window* SDL_WindowID;

#define SDL_RenderPoint SDL_RenderDrawPoint
#define SDL_RenderLine SDL_RenderDrawLine
#define SDL_RenderFill(X) (X) ? SDL_RenderFillRect(X) : SDL_RenderClear()
Expand Down

0 comments on commit fcff670

Please sign in to comment.