Module: wine
Branch: master
Commit: 4e959365484ebf3f0e1efb4bf9f55c22091e82a8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e959365484ebf3f0e1efb4bf…
Author: Michael Stefaniuc <mstefani(a)redhat.de>
Date: Sat Jun 9 01:13:42 2012 +0200
include: Drop outdated comment about COM interface implementations.
---
include/objbase.h | 43 +------------------------------------------
1 files changed, 1 insertions(+), 42 deletions(-)
diff --git a/include/objbase.h b/include/objbase.h
index 52c6b56..c366a28 100644
--- a/include/objbase.h
+++ b/include/objbase.h
@@ -41,7 +41,7 @@
* virtual methods in C++ and a structure with a table of pointer to functions in C.
* Unfortunately the layout of the virtual table is compiler specific, the layout of
* g++ virtual tables is not the same as that of an egcs virtual table which is not the
- * same as that generated by Visual C+. There are workarounds to make the virtual tables
+ * same as that generated by Visual C++. There are workarounds to make the virtual tables
* compatible via padding but unfortunately the one which is imposed to the WINE emulator
* by the Windows binaries, i.e. the Visual C++ one, is the most compact of all.
*
@@ -168,47 +168,6 @@
* - Of course in C++ we use inheritance so that we don't have to duplicate the method definitions.
* - Finally there is no IDirect3D_Xxx macro. These are not needed in C++ unless the CINTERFACE
* macro is defined in which case we would not be here.
- *
- *
- * Implementing a COM interface.
- *
- * This continues the above example. This example assumes that the implementation is in C.
- *
- * typedef struct IDirect3DImpl {
- * void* lpVtbl;
- * // ...
- *
- * } IDirect3DImpl;
- *
- * static IDirect3DVtbl d3dvt;
- *
- * // implement the IDirect3D methods here
- *
- * int IDirect3D_QueryInterface(IDirect3D* me)
- * {
- * IDirect3DImpl *This = (IDirect3DImpl *)me;
- * // ...
- * }
- *
- * // ...
- *
- * static IDirect3DVtbl d3dvt = {
- * IDirect3D_QueryInterface,
- * IDirect3D_Add,
- * IDirect3D_Add2,
- * IDirect3D_Initialize,
- * IDirect3D_SetWidth
- * };
- *
- * Comments:
- * - We first define what the interface really contains. This is the IDirect3DImpl structure. The
- * first field must of course be the virtual table pointer. Everything else is free.
- * - Then we predeclare our static virtual table variable, we will need its address in some
- * methods to initialize the virtual table pointer of the returned interface objects.
- * - Then we implement the interface methods. To match what has been declared in the header file
- * they must take a pointer to an IDirect3D structure and we must cast it to an IDirect3DImpl so
- * that we can manipulate the fields.
- * - Finally we initialize the virtual table.
*/
#if defined(__cplusplus) && !defined(CINTERFACE)
Module: wine
Branch: master
Commit: 422d57e7d210f599f60c42de87c6759ef48323b3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=422d57e7d210f599f60c42de8…
Author: Christian Costa <titan.costa(a)gmail.com>
Date: Fri Jun 8 15:38:25 2012 +0200
d3drm: Fix vertex index test and print a warning when it is out of range.
---
dlls/d3drm/meshbuilder.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/d3drm/meshbuilder.c b/dlls/d3drm/meshbuilder.c
index bdb5e00..1bb84c5 100644
--- a/dlls/d3drm/meshbuilder.c
+++ b/dlls/d3drm/meshbuilder.c
@@ -1366,8 +1366,11 @@ HRESULT load_mesh_data(IDirect3DRMMeshBuilder3* iface, LPDIRECTXFILEDATA pData)
else
{
DWORD vertex_idx = *faces_vertex_idx_ptr;
- if (vertex_idx > This->nb_vertices)
+ if (vertex_idx >= This->nb_vertices)
+ {
+ WARN("Found vertex index %u but only %u vertices available => use index 0\n", vertex_idx, This->nb_vertices);
vertex_idx = 0;
+ }
*(faces_data_ptr + faces_data_size++) = vertex_idx;
/* Add face normal to vertex normal */
D3DRMVectorAdd(&This->pNormals[vertex_idx], &This->pNormals[vertex_idx], &face_normal);