1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-11 17:37:23 +00:00

Disable live resize for yuv - HW accel bug

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12426 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nplourde 2004-05-05 02:38:35 +00:00
parent ba0a69a969
commit 4ba93d4a2a

View File

@ -334,6 +334,11 @@ static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32
windowAttrs = kWindowStandardDocumentAttributes windowAttrs = kWindowStandardDocumentAttributes
| kWindowStandardHandlerAttribute | kWindowStandardHandlerAttribute
| kWindowLiveResizeAttribute; | kWindowLiveResizeAttribute;
if (!(IMGFMT_IS_RGB(image_format)))
{
windowAttrs &= (~kWindowResizableAttribute);
}
SetRect(&winRect, 0, 0, d_width, d_height); SetRect(&winRect, 0, 0, d_width, d_height);
SetRect(&dstRect, 0, 0, d_width, d_height); SetRect(&dstRect, 0, 0, d_width, d_height);
@ -900,10 +905,10 @@ void window_resized()
CreateCGContextForPort(GetWindowPort(theWindow),&context); CreateCGContextForPort(GetWindowPort(theWindow),&context);
//fill background with black //fill background with black
//CGRect winBounds = CGRectMake( winRect.top, winRect.left, winRect.right, winRect.bottom); CGRect winBounds = CGRectMake( winRect.top, winRect.left, winRect.right, winRect.bottom);
//CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 1.0); CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 1.0);
//CGContextFillRect(context, winBounds); CGContextFillRect(context, winBounds);
//CGContextFlush(context); CGContextFlush(context);
#ifdef QUARTZ_ENABLE_YUV #ifdef QUARTZ_ENABLE_YUV
switch (image_format) switch (image_format)
@ -977,7 +982,9 @@ void window_fullscreen()
HideCursor(); HideCursor();
//go fullscreen //go fullscreen
ChangeWindowAttributes(theWindow, 0, kWindowResizableAttribute); if (IMGFMT_IS_RGB(image_format))
ChangeWindowAttributes(theWindow, 0, kWindowResizableAttribute);
MoveWindow (theWindow, 0, 0, 1); MoveWindow (theWindow, 0, 0, 1);
SizeWindow(theWindow, device_width, device_height,1); SizeWindow(theWindow, device_width, device_height,1);
@ -999,7 +1006,9 @@ void window_fullscreen()
ShowCursor(); ShowCursor();
//revert window to previous setting //revert window to previous setting
ChangeWindowAttributes(theWindow, kWindowResizableAttribute, 0); if (IMGFMT_IS_RGB(image_format))
ChangeWindowAttributes(theWindow, kWindowResizableAttribute, 0);
SizeWindow(theWindow, oldRect.right, oldRect.bottom,1); SizeWindow(theWindow, oldRect.right, oldRect.bottom,1);
RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen); RepositionWindow(theWindow, NULL, kWindowCascadeOnMainScreen);