Mercurial > mplayer.hg
comparison gui/ui/main.c @ 35795:5eac7c0879b7
Make mainDrawBuffer static.
Additionally, remove unnecessary initialization.
author | ib |
---|---|
date | Fri, 25 Jan 2013 22:31:37 +0000 |
parents | 9fdc3e22063f |
children | 497a1c45a597 |
comparison
equal
deleted
inserted
replaced
35794:153a4c76e291 | 35795:5eac7c0879b7 |
---|---|
52 #include "mp_core.h" | 52 #include "mp_core.h" |
53 #include "libavutil/common.h" | 53 #include "libavutil/common.h" |
54 | 54 |
55 #include "actions.h" | 55 #include "actions.h" |
56 | 56 |
57 unsigned char * mainDrawBuffer = NULL; | 57 static unsigned char * mainDrawBuffer; |
58 int uiMainRender = True; | 58 int uiMainRender = True; |
59 | 59 |
60 int mainVisible = True; | 60 int mainVisible = True; |
61 | 61 |
62 int boxMoved = False; | 62 int boxMoved = False; |
338 } | 338 } |
339 } | 339 } |
340 | 340 |
341 void uiMainInit (void) | 341 void uiMainInit (void) |
342 { | 342 { |
343 if (mainDrawBuffer) free(mainDrawBuffer); | |
344 | |
343 mainDrawBuffer = malloc(guiApp.main.Bitmap.ImageSize); | 345 mainDrawBuffer = malloc(guiApp.main.Bitmap.ImageSize); |
344 | 346 |
345 if (!mainDrawBuffer) | 347 if (!mainDrawBuffer) |
346 { | 348 { |
347 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); | 349 gmp_msg(MSGT_GPLAYER, MSGL_FATAL, MSGTR_NEMDB); |