Module: wine
Branch: master
Commit: 491e44d4257527e37cff4d5f28b499b5a3d08cdd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=491e44d4257527e37cff4d5f2…
Author: Vincent Povirk <vincent(a)codeweavers.com>
Date: Wed Sep 3 16:08:22 2008 -0500
user32/tests: Don't check menu items when testing MNS_CHECKORBMP.
If the MNS_CHECKORBMP style is set on a menu, and the menu is checked,
the bitmap is not drawn. For the menu tests, that means we get no
WM_DRAWITEM message for an owner-drawn bitmap, and the bounding box of
the bitmap is not tested. We should leave the menu item unchecked in
this case so we can test it.
---
dlls/user32/tests/menu.c | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c
index 4e879c6..74cb2a0 100644
--- a/dlls/user32/tests/menu.c
+++ b/dlls/user32/tests/menu.c
@@ -357,7 +357,8 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
MOD_GotDrawItemMsg = FALSE;
mii.fMask = MIIM_FTYPE | MIIM_DATA | MIIM_STATE;
mii.fType = 0;
- mii.fState = MF_CHECKED;
+ /* check the menu item unless MNS_CHECKORBMP is set */
+ mii.fState = (mnuopt != 2 ? MFS_CHECKED : MFS_UNCHECKED);
mii.dwItemData =0;
MODsizes[0] = bmpsize;
hastab = 0;
@@ -447,10 +448,20 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
if( hbmp == HBMMENU_CALLBACK && MOD_GotDrawItemMsg) {
/* check the position of the bitmap */
/* horizontal */
- expect = ispop ? (4 + ( mnuopt ? 0 : GetSystemMetrics(SM_CXMENUCHECK)))
- : 3;
- ok( expect == MOD_rc[0].left,
- "bitmap left is %d expected %d\n", MOD_rc[0].left, expect);
+ if (!ispop)
+ expect = 3;
+ else if (mnuopt == 0)
+ expect = 4 + GetSystemMetrics(SM_CXMENUCHECK);
+ else if (mnuopt == 1)
+ expect = 4;
+ else /* mnuopt == 2 */
+ expect = 2;
+ if (ispop && mnuopt == 2)
+ todo_wine ok( expect == MOD_rc[0].left,
+ "bitmap left is %d expected %d\n", MOD_rc[0].left, expect);
+ else
+ ok( expect == MOD_rc[0].left,
+ "bitmap left is %d expected %d\n", MOD_rc[0].left, expect);
failed = failed || !(expect == MOD_rc[0].left);
/* vertical */
expect = (rc.bottom - rc.top - MOD_rc[0].bottom + MOD_rc[0].top) / 2;
Module: wine
Branch: master
Commit: 7c38816819178e517d150110e7520dc8ed0ad1c1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7c38816819178e517d150110e…
Author: Alexander Dorofeyev <alexd4(a)inbox.lv>
Date: Wed Sep 3 23:59:46 2008 +0300
wined3d: Remove glDrawBuffer calls in BltOverride.
Handled in ActivateContext, must be remains of pre-context management code.
---
dlls/wined3d/surface.c | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 283b159..31cb368 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3468,9 +3468,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
}
ENTER_GL();
- glDrawBuffer(buffer);
- checkGLcall("glDrawBuffer");
-
myDevice->blitter->set_shader((IWineD3DDevice *) myDevice, Src->resource.format,
Src->glDescription.target, Src->pow2Width, Src->pow2Height);
@@ -3543,13 +3540,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, RECT *
/* Leave the opengl state valid for blitting */
myDevice->blitter->unset_shader((IWineD3DDevice *) myDevice);
- /* The draw buffer should only need to be restored if we were drawing to the front buffer, and there is a back buffer.
- * otherwise the context manager should choose between GL_BACK / offscreenDrawBuffer
- */
- if(dstSwapchain && This == (IWineD3DSurfaceImpl *) dstSwapchain->frontBuffer && dstSwapchain->backBuffer) {
- glDrawBuffer(GL_BACK);
- checkGLcall("glDrawBuffer");
- }
/* Restore the color key parameters */
Src->CKeyFlags = oldCKeyFlags;
Src->SrcBltCKey = oldBltCKey;
Module: wine
Branch: master
Commit: 5c7f2906eeaa9825049eea53240edd71606ec103
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5c7f2906eeaa9825049eea532…
Author: Alexander Dorofeyev <alexd4(a)inbox.lv>
Date: Wed Sep 3 23:59:41 2008 +0300
wined3d: Make the condition to enter p8 conversion shader path more strict.
This prevents shader path from being entered for an offscreen surface
when there is p8 render target and fixes failures in ddraw visual test
(with opengl rendering and RTL_READDRAW mode) and visual glitches in
Red Alert.
---
dlls/wined3d/surface.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 500b05d..283b159 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1533,7 +1533,11 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
* in which the main render target uses p8. Some games like GTA Vice City use P8 for texturing which
* conflicts with this.
*/
- if( !(GL_SUPPORT(EXT_PALETTED_TEXTURE) || (GL_SUPPORT(ARB_FRAGMENT_PROGRAM) && primary_render_target_is_p8(device))) || colorkey_active || !use_texturing ) {
+ if( !(GL_SUPPORT(EXT_PALETTED_TEXTURE) ||
+ (GL_SUPPORT(ARB_FRAGMENT_PROGRAM) &&
+ device->render_targets &&
+ This == (IWineD3DSurfaceImpl*)device->render_targets[0])) ||
+ colorkey_active || !use_texturing ) {
*format = GL_RGBA;
*internal = GL_RGBA;
*type = GL_UNSIGNED_BYTE;