Module: wine
Branch: refs/heads/master
Commit: 38290cf9772a578deeebe4076d44574f2312a101
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=38290cf9772a578deeebe40…
Author: Vitaliy Margolen <wine-patch(a)kievinfo.com>
Date: Mon Feb 6 20:58:48 2006 +0100
comctl32: Add month calendar tests.
---
dlls/comctl32/tests/.gitignore | 1 +
dlls/comctl32/tests/Makefile.in | 1 +
dlls/comctl32/tests/monthcal.c | 69 +++++++++++++++++++++++++++++++++++++++
3 files changed, 71 insertions(+), 0 deletions(-)
create mode 100644 dlls/comctl32/tests/monthcal.c
diff --git a/dlls/comctl32/tests/.gitignore b/dlls/comctl32/tests/.gitignore
index 5ed31bc..c4d729a 100644
--- a/dlls/comctl32/tests/.gitignore
+++ b/dlls/comctl32/tests/.gitignore
@@ -3,6 +3,7 @@ comboex.ok
dpa.ok
header.ok
imagelist.ok
+monthcal.ok
mru.ok
progress.ok
subclass.ok
diff --git a/dlls/comctl32/tests/Makefile.in b/dlls/comctl32/tests/Makefile.in
index 1528964..87af63c 100644
--- a/dlls/comctl32/tests/Makefile.in
+++ b/dlls/comctl32/tests/Makefile.in
@@ -10,6 +10,7 @@ CTESTS = \
dpa.c \
header.c \
imagelist.c \
+ monthcal.c \
mru.c \
progress.c \
subclass.c \
diff --git a/dlls/comctl32/tests/monthcal.c b/dlls/comctl32/tests/monthcal.c
new file mode 100644
index 0000000..82b41b3
--- /dev/null
+++ b/dlls/comctl32/tests/monthcal.c
@@ -0,0 +1,69 @@
+/*
+ * comctl32 month calendar unit tests
+ *
+ * Copyright (C) 2006 Vitaliy Margolen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+
+#include "commctrl.h"
+
+#include "wine/test.h"
+
+void test_monthcal(void)
+{
+ HWND hwnd;
+ SYSTEMTIME st[2];
+ INITCOMMONCONTROLSEX ic = {sizeof(INITCOMMONCONTROLSEX), ICC_DATE_CLASSES};
+
+ InitCommonControlsEx(&ic);
+ hwnd = CreateWindowA(MONTHCAL_CLASSA, "MonthCal", WS_POPUP | WS_VISIBLE, CW_USEDEFAULT,
+ 0, 300, 300, 0, 0, NULL, NULL);
+ ok(hwnd != NULL, "Failed to create MonthCal\n");
+ GetSystemTime(&st[0]);
+ st[0].wMonth = 5;
+ st[1] = st[0];
+
+ st[1].wMonth--;
+ ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n");
+ st[1].wMonth += 2;
+ ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n");
+ st[1].wYear --;
+ ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n");
+ st[1].wYear += 1;
+ ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MIN | GDTR_MAX, (LPARAM)st), "Failed to set both min and max limits\n");
+
+/* This crashing Wine so commented untill fixed.
+ st[1].wMonth -= 3;
+ ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
+*/
+ st[1].wMonth += 4;
+ ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
+ st[1].wYear -= 3;
+ ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
+ st[1].wYear += 4;
+ ok(SendMessage(hwnd, MCM_SETRANGE, GDTR_MAX, (LPARAM)st), "Failed to set max limit\n");
+}
+
+START_TEST(monthcal)
+{
+ test_monthcal();
+}
Module: wine
Branch: refs/heads/master
Commit: 379b62c04ee5f134f0b38ead63cf7ca1aec61a7c
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=379b62c04ee5f134f0b38ea…
Author: Francois Gouget <fgouget(a)free.fr>
Date: Mon Feb 6 20:58:36 2006 +0100
Assorted spelling fixes.
---
dlls/comctl32/progress.c | 2 +-
dlls/crypt32/tests/str.c | 2 +-
dlls/oleaut32/variant.h | 2 +-
dlls/user/tests/menu.c | 14 +++++++-------
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/comctl32/progress.c b/dlls/comctl32/progress.c
index cfed7ec..9592cd6 100644
--- a/dlls/comctl32/progress.c
+++ b/dlls/comctl32/progress.c
@@ -132,7 +132,7 @@ static inline int get_bar_position( PROG
* PROGRESS_Invalidate
*
* Don't be too clever about invalidating the progress bar.
- * Installshield depends on this simple behaviour.
+ * InstallShield depends on this simple behaviour.
*/
static void PROGRESS_Invalidate( PROGRESS_INFO *infoPtr, INT old, INT new )
{
diff --git a/dlls/crypt32/tests/str.c b/dlls/crypt32/tests/str.c
index a099ba7..42fd271 100644
--- a/dlls/crypt32/tests/str.c
+++ b/dlls/crypt32/tests/str.c
@@ -1,7 +1,7 @@
/*
* Unit test suite for crypt32.dll's Cert*ToStr and CertStrToName functions.
*
- * Copyright 2006 Juan Lang, Aric Stewart for Codeweavers
+ * Copyright 2006 Juan Lang, Aric Stewart for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/dlls/oleaut32/variant.h b/dlls/oleaut32/variant.h
index 42c5e76..decf337 100644
--- a/dlls/oleaut32/variant.h
+++ b/dlls/oleaut32/variant.h
@@ -34,7 +34,7 @@
/* Get the extra flags from a variant pointer */
#define V_EXTRA_TYPE(v) (V_VT((v)) & VT_EXTRA_TYPE)
-/* Missing in Windows but usefull VTBIT_* defines */
+/* Missing in Windows but useful VTBIT_* defines */
#define VTBIT_BOOL (1 << VT_BSTR)
#define VTBIT_BSTR (1 << VT_BSTR)
#define VTBIT_DATE (1 << VT_DATE)
diff --git a/dlls/user/tests/menu.c b/dlls/user/tests/menu.c
index 0ae0d2b..442cc97 100644
--- a/dlls/user/tests/menu.c
+++ b/dlls/user/tests/menu.c
@@ -125,7 +125,7 @@ static void register_menu_check_class(vo
atomMenuCheckClass = RegisterClass(&wc);
}
-/* demonstrates that windows lock the menu object so that it is still valid
+/* demonstrates that windows locks the menu object so that it is still valid
* even after a client calls DestroyMenu on it */
static void test_menu_locked_by_window(void)
{
@@ -225,7 +225,7 @@ static void test_menu_ownerdraw(void)
"Height is incorrect. Got %ld expected %d\n",
MOD_rc[0].bottom - MOD_rc[0].top, MOD_SIZE);
- /* test width/height of a OD menu bar as well */
+ /* test width/height of an ownerdraw menu bar as well */
ret = DestroyMenu(hmenu);
ok(ret, "DestroyMenu failed with error %ld\n", GetLastError());
hmenu = CreateMenu();
@@ -326,7 +326,7 @@ static void test_menu_add_string( void )
rc = SetMenuItemInfo( hmenu, 0, TRUE, &info );
ok (!rc, "SetMenuItemInfo unexpectedly worked\n");
- /* Just change ftype back and ensure data hasnt been freed */
+ /* Just change ftype back and ensure data hasn't been freed */
info.fType= MFT_OWNERDRAW; /* Set as ownerdraw type */
info.dwTypeData= (char *)0xdeadbee3;
rc = SetMenuItemInfo( hmenu, 0, TRUE, &info );
@@ -549,7 +549,7 @@ static void test_menu_iteminfo( void )
{, S, MIIM_TYPE, MFT_OWNERDRAW, -9, -9, 0, -9, -9, -9, NULL, 0, 0, },
empty, OK, ER )
TMII_DONE
- /* can not combine MIIM_TYPE with some other flags */
+ /* cannot combine MIIM_TYPE with some other flags */
TMII_INSMI( {, S, MIIM_TYPE|MIIM_STRING, MFT_STRING, -1, -1, -1, -1, -1, -1, txt, 6, -1, }, ER)
TMII_GMII ( {, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, },
{, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, },
@@ -887,7 +887,7 @@ static void test_menu_iteminfo( void )
}
/*
- The following tests try to confirm the algorithum used to return the menu items
+ The following tests try to confirm the algorithm used to return the menu items
when there is a collision between a menu item and a popup menu
*/
void test_menu_search_bycommand( void )
@@ -1021,7 +1021,7 @@ void test_menu_search_bycommand( void )
rc = InsertMenuItem(hmenu, 0, TRUE, &info );
ok (rc, "Inserting the menuitem failed\n");
- /* Search by id - returns the item which preceeds the popup menu */
+ /* Search by id - returns the item which precedes the popup menu */
memset( &info, 0, sizeof info );
strback[0] = 0x00;
info.cbSize = sizeof(MENUITEMINFO);
@@ -1068,7 +1068,7 @@ void test_menu_search_bycommand( void )
rc = InsertMenuItem(hmenuSub, 1, TRUE, &info );
ok (rc, "Inserting the sub menu menuitem 2 failed\n");
- /* Prove that you cant query the id of a popup directly (By position) */
+ /* Prove that you can't query the id of a popup directly (By position) */
id = GetMenuItemID(hmenu, 0);
ok (id == -1, "Getting the sub menu id should have failed because its a popup (gave %x)\n", id);
Module: wine
Branch: refs/heads/master
Commit: 694efd7c6fd557a9c761b805122dc9d5fad1c69d
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=694efd7c6fd557a9c761b80…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net>
Date: Mon Feb 6 20:57:42 2006 +0100
wined3d: Texture fixes.
Set video memory capabilities, add some checks to SetTexture and
update some comments.
---
dlls/wined3d/device.c | 11 +++++++++++
dlls/wined3d/directx.c | 4 +++-
dlls/wined3d/surface.c | 10 ++++++++--
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index d98933c..635dd5b 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4436,6 +4436,17 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetTex
return D3DERR_INVALIDCALL;
}
+ if(pTexture != NULL) {
+ /* SetTexture isn't allowed on textures in D3DPOOL_SCRATCH; The same is
+ * the case for D3DPOOL_SYSTEMMEM textures unless D3DDEVCAPS_TEXTURESYSTEMMORY is set.
+ * We don't check the caps as GetDeviceCaps is inefficient and we don't set the cap anyway.
+ */
+ if(((IWineD3DTextureImpl*)pTexture)->resource.pool == D3DPOOL_SCRATCH || ((IWineD3DTextureImpl*)pTexture)->resource.pool == D3DPOOL_SYSTEMMEM) {
+ WARN("(%p) Attempt to set scratch texture rejected\n", pTexture);
+ return D3DERR_INVALIDCALL;
+ }
+ }
+
oldTexture = This->updateStateBlock->textures[Stage];
TRACE("GL_LIMITS %d\n",GL_LIMITS(textures));
TRACE("(%p) : oldtexture(%p)\n", This,oldTexture);
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 01b4103..f117f6f 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1456,8 +1456,10 @@ HRESULT WINAPI IWineD3DImpl_GetDeviceCap
*pCaps->DevCaps = D3DDEVCAPS_DRAWPRIMTLVERTEX |
D3DDEVCAPS_HWTRANSFORMANDLIGHT |
+ D3DDEVCAPS_EXECUTEVIDEOMEMORY |
D3DDEVCAPS_PUREDEVICE |
- D3DDEVCAPS_HWRASTERIZATION;
+ D3DDEVCAPS_HWRASTERIZATION |
+ D3DDEVCAPS_TEXTUREVIDEOMEMORY;
*pCaps->PrimitiveMiscCaps = D3DPMISCCAPS_CULLCCW |
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 06d5a89..0c928a5 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -912,8 +912,14 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LoadT
This->Dirty = FALSE;
- /* Resources are placed in system RAM and do not need to be recreated when a device is lost. These resources are not bound by device size or format restrictions. Because of this, these resources cannot be accessed by the Direct3D device nor set as textures or render targets. However, these resources can always be created, locked, and copied. */
- if (This->resource.pool == D3DPOOL_SCRATCH || This->resource.pool == D3DPOOL_SYSTEMMEM) /*never store scratch or system mem textures in the video ram*/
+ /* Resources are placed in system RAM and do not need to be recreated when a device is lost.
+ * These resources are not bound by device size or format restrictions. Because of this,
+ * these resources cannot be accessed by the Direct3D device nor set as textures or render targets.
+ * However, these resources can always be created, locked, and copied.
+ * In general never store scratch or system mem textures in the video ram. However it is allowed
+ * for system memory textures when D3DDEVCAPS_TEXTURESYSTEMMEMORY is set but it isn't right now.
+ */
+ if (This->resource.pool == D3DPOOL_SCRATCH || This->resource.pool == D3DPOOL_SYSTEMMEM)
{
FIXME("(%p) Operation not supported for scratch or SYSTEMMEM textures\n",This);
return D3DERR_INVALIDCALL;