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;
|
LONG rc;
|
||||||
BOOL EnumerateAttachedSecondaries = FALSE;
|
BOOL EnumerateAttachedSecondaries = FALSE;
|
||||||
DWORD privateDWFlags = 0;
|
DWORD privateDWFlags = 0;
|
||||||
CHAR strMsg[RC_STRING_MAX_SIZE];
|
|
||||||
HRESULT retVal = DDERR_INVALIDPARAMS;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
if ((IsBadCodePtr((LPVOID)lpCallback) == 0) &&
|
rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, REGSTR_PATH_DDHW, &hKey);
|
||||||
((dwFlags & ~(DDENUM_NONDISPLAYDEVICES |
|
if (rc == ERROR_SUCCESS)
|
||||||
DDENUM_DETACHEDSECONDARYDEVICES |
|
|
||||||
DDENUM_ATTACHEDSECONDARYDEVICES)) == 0))
|
|
||||||
{
|
{
|
||||||
LoadStringA(hDllModule, STR_PRIMARY_DISPLAY, (LPSTR)&strMsg, RC_STRING_MAX_SIZE);
|
/* Enumerate Attached Secondaries */
|
||||||
|
cbData = sizeof(DWORD);
|
||||||
rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, REGSTR_PATH_DDHW, &hKey);
|
rc = RegQueryValueExA(hKey, "EnumerateAttachedSecondaries", NULL, NULL, (LPBYTE)&Value, &cbData);
|
||||||
if (rc == ERROR_SUCCESS)
|
if (rc == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
/* Enumerate Attached Secondaries */
|
if (Value != 0)
|
||||||
cbData = sizeof(DWORD);
|
{
|
||||||
rc = RegQueryValueExA(hKey, "EnumerateAttachedSecondaries", NULL, NULL, (LPBYTE)&Value, &cbData);
|
EnumerateAttachedSecondaries = TRUE;
|
||||||
if (rc == ERROR_SUCCESS)
|
privateDWFlags = DDENUM_ATTACHEDSECONDARYDEVICES;
|
||||||
{
|
}
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
return retVal;
|
// not finish
|
||||||
|
return DDERR_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT
|
HRESULT
|
||||||
|
|
Loading…
Reference in a new issue