Mercurial > mplayer.hg
comparison gui/skin/skin.c @ 33105:1cd1adf9ee6c
Cosmetic: Adjust indent after simplifying cmd_base().
author | ib |
---|---|
date | Sun, 03 Apr 2011 10:38:35 +0000 |
parents | 65827197d1af |
children | e9e5ee3a1a82 |
comparison
equal
deleted
inserted
replaced
33104:65827197d1af | 33105:1cd1adf9ee6c |
---|---|
242 x = cutItemToInt(in, ',', 1); | 242 x = cutItemToInt(in, ',', 1); |
243 y = cutItemToInt(in, ',', 2); | 243 y = cutItemToInt(in, ',', 2); |
244 w = cutItemToInt(in, ',', 3); | 244 w = cutItemToInt(in, ',', 3); |
245 h = cutItemToInt(in, ',', 4); | 245 h = cutItemToInt(in, ',', 4); |
246 | 246 |
247 { | 247 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] image: %s", fname); |
248 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] image: %s", fname); | 248 |
249 | 249 currWin->type = itBase; |
250 currWin->type = itBase; | 250 |
251 | 251 if (!is_menu) { |
252 if (!is_menu) { | 252 currWin->x = x; |
253 currWin->x = x; | 253 currWin->y = y; |
254 currWin->y = y; | 254 |
255 | 255 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, " %d,%d", x, y); |
256 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, " %d,%d", x, y); | 256 } |
257 } | 257 |
258 | 258 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "\n"); |
259 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "\n"); | 259 |
260 | 260 av_strlcpy(file, path, sizeof(file)); |
261 av_strlcpy(file, path, sizeof(file)); | 261 av_strlcat(file, fname, sizeof(file)); |
262 av_strlcat(file, fname, sizeof(file)); | 262 |
263 | 263 if (skinBPRead(file, &currWin->Bitmap) != 0) |
264 if (skinBPRead(file, &currWin->Bitmap) != 0) | 264 return 1; |
265 return 1; | 265 |
266 | 266 currWin->width = currWin->Bitmap.Width; |
267 currWin->width = currWin->Bitmap.Width; | 267 currWin->height = currWin->Bitmap.Height; |
268 currWin->height = currWin->Bitmap.Height; | 268 |
269 | 269 if (is_sub) { |
270 if (is_sub) { | |
271 if (w && h) { | 270 if (w && h) { |
272 currWin->width = w; | 271 currWin->width = w; |
273 currWin->height = h; | 272 currWin->height = h; |
274 } | 273 } |
275 } | 274 } |
276 | 275 |
277 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] bitmap: %dx%d\n", currWin->width, currWin->height); | 276 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] bitmap: %dx%d\n", currWin->width, currWin->height); |
278 | 277 |
279 if (!is_sub) { | 278 if (!is_sub) { |
280 #ifdef CONFIG_XSHAPE | 279 #ifdef CONFIG_XSHAPE |
281 Convert32to1(&currWin->Bitmap, &currWin->Mask, 0x00ff00ff); | 280 Convert32to1(&currWin->Bitmap, &currWin->Mask, 0x00ff00ff); |
282 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] mask: %lux%lu\n", currWin->Mask.Width, currWin->Mask.Height); | 281 mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin] mask: %lux%lu\n", currWin->Mask.Width, currWin->Mask.Height); |
283 #else | 282 #else |
284 currWin->Mask.Image = NULL; | 283 currWin->Mask.Image = NULL; |
285 #endif | 284 #endif |
286 } | 285 } |
287 | 286 |
288 if (is_bar) | 287 if (is_bar) |
289 skin->barIsPresent = 1; | 288 skin->barIsPresent = 1; |
290 if (is_menu) | 289 if (is_menu) |
291 skin->menuIsPresent = 1; | 290 skin->menuIsPresent = 1; |
292 } | |
293 | 291 |
294 return 0; | 292 return 0; |
295 } | 293 } |
296 | 294 |
297 // background=R,G,B | 295 // background=R,G,B |