small ctl3d fix

Dmitry Timoshkov dmitry at baikal.ru
Sun Feb 2 05:15:49 CST 2003


"Rok Mandeljc" <rokmandeljc at hotmail.com> wrote:

> I've finally found a bug which crashed Ultima IX at startup.
> 
> ChangeLog:
>  - added debug messages
>  - changed return of Ctl3dIsAutoSubclass from FALSE to TRUE

Attached patch should fix the problem in a right way.

Changelog:
    Manage internal ctl3d auto subclass flag.

-- 
Dmitry.

-------------- next part --------------
diff -u cvs/hq/wine/dlls/ctl3d/ctl3d.c wine/dlls/ctl3d/ctl3d.c
--- cvs/hq/wine/dlls/ctl3d/ctl3d.c	Fri Jan  3 03:34:14 2003
+++ wine/dlls/ctl3d/ctl3d.c	Sun Feb  2 18:57:51 2003
@@ -21,13 +21,17 @@
 #include "wine/winbase16.h"
 #include "wine/winuser16.h"
 
+static BOOL16 CTL3D16_is_auto_subclass = FALSE;
+
 BOOL16 WINAPI Ctl3dAutoSubclass16(HINSTANCE16 hInst)
 {
+    CTL3D16_is_auto_subclass = TRUE;
     return TRUE;
 }
 
 BOOL16 WINAPI Ctl3dAutoSubclassEx16(HINSTANCE16 hInst, DWORD type)
 {
+    CTL3D16_is_auto_subclass = TRUE;
     return TRUE;
 }
 
@@ -46,7 +50,6 @@
     return 0;
 }
 
-
 LONG WINAPI Ctl3dDlgFramePaint16(HWND16 hwnd, UINT16 msg, WPARAM16 wParam, LPARAM lParam)
 {
     return DefWindowProc16(hwnd, msg, wParam, lParam);
@@ -64,7 +67,7 @@
 
 BOOL16 WINAPI Ctl3dIsAutoSubclass16(void)
 {
-    return FALSE;
+    return CTL3D16_is_auto_subclass;
 }
 
 BOOL16 WINAPI Ctl3dRegister16(HINSTANCE16 hInst)
@@ -94,14 +97,15 @@
 
 BOOL16 WINAPI Ctl3dUnAutoSubclass16(void)
 {
+    CTL3D16_is_auto_subclass = FALSE;
     return FALSE;
 }
 
 BOOL16 WINAPI Ctl3dUnregister16(HINSTANCE16 hInst)
 {
+    CTL3D16_is_auto_subclass = FALSE;
     return TRUE;
 }
-
 
 BOOL16 WINAPI Ctl3dUnsubclassCtl16(HWND16 hwnd)
 {
diff -u cvs/hq/wine/dlls/ctl3d/ctl3d32.c wine/dlls/ctl3d/ctl3d32.c
--- cvs/hq/wine/dlls/ctl3d/ctl3d32.c	Fri Jan  3 03:34:14 2003
+++ wine/dlls/ctl3d/ctl3d32.c	Sun Feb  2 18:54:15 2003
@@ -21,13 +21,17 @@
 #include "winbase.h"
 #include "winuser.h"
 
+static BOOL CTL3D_is_auto_subclass = FALSE;
+
 BOOL WINAPI Ctl3dAutoSubclass(HINSTANCE hInst)
 {
+    CTL3D_is_auto_subclass = TRUE;
     return TRUE;
 }
 
 BOOL WINAPI Ctl3dAutoSubclassEx(HINSTANCE hInst, DWORD type)
 {
+    CTL3D_is_auto_subclass = TRUE;
     return TRUE;
 }
 
@@ -46,7 +50,6 @@
     return 0;
 }
 
-
 LONG WINAPI Ctl3dDlgFramePaint(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     return DefWindowProcA(hwnd, msg, wParam, lParam);
@@ -64,7 +67,7 @@
 
 BOOL WINAPI Ctl3dIsAutoSubclass(void)
 {
-    return FALSE;
+    return CTL3D_is_auto_subclass;
 }
 
 BOOL WINAPI Ctl3dRegister(HINSTANCE hInst)
@@ -94,14 +97,15 @@
 
 BOOL WINAPI Ctl3dUnAutoSubclass(void)
 {
+    CTL3D_is_auto_subclass = FALSE;
     return FALSE;
 }
 
 BOOL WINAPI Ctl3dUnregister(HINSTANCE hInst)
 {
+    CTL3D_is_auto_subclass = FALSE;
     return TRUE;
 }
-
 
 BOOL WINAPI Ctl3dUnsubclassCtl(HWND hwnd)
 {


More information about the wine-patches mailing list