mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
revert part of rev30826 that was accented committed
svn path=/trunk/; revision=30857
This commit is contained in:
parent
c0507448cf
commit
e8360ce5fe
1 changed files with 13 additions and 36 deletions
|
@ -220,51 +220,28 @@ DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA lpCallback,
|
|||
LONG rc;
|
||||
BOOL EnumerateAttachedSecondaries = FALSE;
|
||||
DWORD privateDWFlags = 0;
|
||||
CHAR strMsg[RC_STRING_MAX_SIZE];
|
||||
HRESULT retVal = DDERR_INVALIDPARAMS;
|
||||
|
||||
DX_WINDBG_trace();
|
||||
|
||||
if ((IsBadCodePtr((LPVOID)lpCallback) == 0) &&
|
||||
((dwFlags & ~(DDENUM_NONDISPLAYDEVICES |
|
||||
DDENUM_DETACHEDSECONDARYDEVICES |
|
||||
DDENUM_ATTACHEDSECONDARYDEVICES)) == 0))
|
||||
rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, REGSTR_PATH_DDHW, &hKey);
|
||||
if (rc == ERROR_SUCCESS)
|
||||
{
|
||||
LoadStringA(hDllModule, STR_PRIMARY_DISPLAY, (LPSTR)&strMsg, RC_STRING_MAX_SIZE);
|
||||
|
||||
rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, REGSTR_PATH_DDHW, &hKey);
|
||||
/* Enumerate Attached Secondaries */
|
||||
cbData = sizeof(DWORD);
|
||||
rc = RegQueryValueExA(hKey, "EnumerateAttachedSecondaries", NULL, NULL, (LPBYTE)&Value, &cbData);
|
||||
if (rc == ERROR_SUCCESS)
|
||||
{
|
||||
/* Enumerate Attached Secondaries */
|
||||
cbData = sizeof(DWORD);
|
||||
rc = RegQueryValueExA(hKey, "EnumerateAttachedSecondaries", NULL, NULL, (LPBYTE)&Value, &cbData);
|
||||
if (rc == ERROR_SUCCESS)
|
||||
{
|
||||
if (Value != 0)
|
||||
{
|
||||
EnumerateAttachedSecondaries = TRUE;
|
||||
privateDWFlags = DDENUM_ATTACHEDSECONDARYDEVICES;
|
||||
}
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
/* Call the user supplyed callback function */
|
||||
rc = lpCallback(NULL, strMsg, "display", lpContext, NULL);
|
||||
|
||||
/* If the callback function returns DDENUMRET_CANCEL, we will stop enumerating devices now */
|
||||
if(rc == DDENUMRET_CANCEL)
|
||||
{
|
||||
retVal = DD_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
// not finish
|
||||
retVal = DDERR_UNSUPPORTED;
|
||||
if (Value != 0)
|
||||
{
|
||||
EnumerateAttachedSecondaries = TRUE;
|
||||
privateDWFlags = DDENUM_ATTACHEDSECONDARYDEVICES;
|
||||
}
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
return retVal;
|
||||
// not finish
|
||||
return DDERR_UNSUPPORTED;
|
||||
}
|
||||
|
||||
HRESULT
|
||||
|
|
Loading…
Reference in a new issue