7 #define BACK_BUTTON_IMG_PATH \
8 "/usr/share/icons/hicolor/scalable/hildon/general_overlay_back.png"
10 #define DIE(format, ...) do { \
11 fprintf(stderr, "Died at %s:%d: ", __FILE__, __LINE__ ); \
12 fprintf(stderr, format "\n", ## __VA_ARGS__); \
16 static SDL_Surface* buttonSrf = 0;
17 static SDL_Rect buttonRect;
19 static const unsigned long totalAnimLen = 1;
21 static unsigned long frameCounter = 0;
27 buttonSrf = IMG_Load(BACK_BUTTON_IMG_PATH);
30 buttonRect.x = GUI.Width - buttonSrf->w;
32 buttonRect.w = buttonSrf->w;
33 buttonRect.h = buttonSrf->h;
36 bool ExitBtnRequiresDraw()
38 if (!Config.fullscreen) return false;
39 if (frameCounter > totalAnimLen) {
48 void ExitBtnDraw(SDL_Surface* where)
50 SDL_BlitSurface(buttonSrf, 0, where, &buttonRect);
51 SDL_UpdateRects(where, 1, &buttonRect);