src/video/x11/SDL_x11mouse.c
changeset 5981 75caa8a7d559
parent 5535 96594ac5fd1a
child 6138 4c64952a58fb
equal deleted inserted replaced
5980:612b41c44af1 5981:75caa8a7d559
   134     }
   134     }
   135 
   135 
   136     /* Code below assumes ARGB pixel format */
   136     /* Code below assumes ARGB pixel format */
   137     SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888);
   137     SDL_assert(surface->format->format == SDL_PIXELFORMAT_ARGB8888);
   138 
   138 
   139     rfg = gfg = bfg = rbg = gbg = bbg = fgBits = 0;
   139     rfg = gfg = bfg = rbg = gbg = bbg = fgBits = bgBits = 0;
   140     for (y = 0; y < surface->h; ++y) {
   140     for (y = 0; y < surface->h; ++y) {
   141         ptr = (Uint32 *)((Uint8 *)surface->pixels + y * surface->pitch);
   141         ptr = (Uint32 *)((Uint8 *)surface->pixels + y * surface->pitch);
   142         for (x = 0; x < surface->w; ++x) {
   142         for (x = 0; x < surface->w; ++x) {
   143             int alpha = (*ptr >> 24) & 0xff;
   143             int alpha = (*ptr >> 24) & 0xff;
   144             int red   = (*ptr >> 16) & 0xff;
   144             int red   = (*ptr >> 16) & 0xff;