diff options
author | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-21 01:44:53 +0300 |
---|---|---|
committer | Uoti Urpala <uau@symbol.nonexistent.invalid> | 2008-04-23 13:46:40 +0300 |
commit | a2212a71a74718d71673336a6b08b11f6cf1535b (patch) | |
tree | f76460a6e4c662cb56b7ffece75e40834241684d /libvo/vo_winvidix.c | |
parent | ce76dfdd4ac46e955cc57c6f5c7ae98d8018abab (diff) | |
download | mpv-a2212a71a74718d71673336a6b08b11f6cf1535b.tar.bz2 mpv-a2212a71a74718d71673336a6b08b11f6cf1535b.tar.xz |
Remove vo_depthonscreen references from non-X VOs
X-specific code uses this global as its internal variable (assuming
that X is initialized if it is set). While using non-X VOs the
variable is not accessed outside the VO. So make those VOs use their
own variables instead of the global vo_depthonscreen.
Diffstat (limited to 'libvo/vo_winvidix.c')
-rw-r--r-- | libvo/vo_winvidix.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c index 5ddc6f5617..4838165da1 100644 --- a/libvo/vo_winvidix.c +++ b/libvo/vo_winvidix.c @@ -43,6 +43,7 @@ LIBVO_EXTERN(winvidix) /* VIDIX related */ static char *vidix_name; +static int depthonscreen; /* Image parameters */ static uint32_t image_width; static uint32_t image_height; @@ -116,7 +117,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM l /*update vidix*/ /* FIXME: implement runtime resize/move if possible, this way is very ugly! */ vidix_stop(); - if(vidix_init(image_width, image_height, vo_dx, vo_dy, vo_dwidth, vo_dheight, image_format, vo_depthonscreen, vo_screenwidth, vo_screenheight) != 0) + if(vidix_init(image_width, image_height, vo_dx, vo_dy, vo_dwidth, vo_dheight, image_format, depthonscreen, vo_screenwidth, vo_screenheight) != 0) mp_msg(MSGT_VO, MSGL_FATAL, "Can't initialize VIDIX driver: %s\n", strerror(errno)); /*set colorkey*/ vidix_start(); @@ -190,7 +191,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,uint32_t d_h image_format = format; vo_screenwidth = GetSystemMetrics(SM_CXSCREEN); vo_screenheight = GetSystemMetrics(SM_CYSCREEN); - vo_depthonscreen = GetDeviceCaps(GetDC(GetDesktopWindow()),BITSPIXEL); + depthonscreen = GetDeviceCaps(GetDC(GetDesktopWindow()),BITSPIXEL); aspect_save_orig(width, height); |