Replace one more PROFILE_ function by RegQueryValueExA.

This commit is contained in:
Dmitry Timoshkov 2001-06-26 19:36:23 +00:00 committed by Alexandre Julliard
parent 36b4e1e2bf
commit b91d2dfa5b
1 changed files with 14 additions and 1 deletions

View File

@ -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 @@ static Atom EVENT_SelectionRequest_STRING( Display *display, Window requestor,
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