Replace one more PROFILE_ function by RegQueryValueExA in x11drv

Dmitry Timoshkov dmitry at baikal.ru
Tue Jun 26 06:55:36 CDT 2001


Hello.

Changelog:
    Dmitry Timoshkov <dmitry at codeweavers.com>
    Replace one more PROFILE_ function by RegQueryValueExA in x11drv.

--- cvs/hq/wine/windows/x11drv/event.c	Tue Jun 26 01:11:48 2001
+++ wine/windows/x11drv/event.c	Tue Jun 26 10:39:34 2001
@@ -35,6 +35,7 @@
 #include "winpos.h"
 #include "file.h"
 #include "windef.h"
+#include "winreg.h"
 #include "x11drv.h"
 #include "shellapi.h"
 
@@ -727,7 +728,19 @@
     int xRc;
 
     if(text_cp == (UINT)-1)
-	text_cp = PROFILE_GetWineIniInt("x11drv", "TextCP", CP_ACP);
+    {
+	HKEY hkey;
+	/* default value */
+	text_cp = CP_ACP;
+	if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\x11drv", &hkey))
+	{
+	    char buf[20];
+	    DWORD type, count = sizeof(buf);
+	    if(!RegQueryValueExA(hkey, "TextCP", 0, &type, buf, &count))
+		text_cp = atoi(buf);
+	    RegCloseKey(hkey);
+	  }
+    }
 
     /*
      * Map the requested X selection property type atom name to a






More information about the wine-patches mailing list