Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

Use a typedef instead of a #define, to handle syntax like: SDL_Textur…

…eID a, b
  • Loading branch information
slouken committed Jan 2, 2011
1 parent c9d0145 commit fcff670e555bde3bf1a053a7413ce4c1f3e34da2
Showing with 3 additions and 2 deletions.
  1. +3 −2 include/SDL_compat.h
@@ -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()

0 comments on commit fcff670

Please sign in to comment.