Author: greatlrd Date: Thu Nov 29 12:56:03 2007 New Revision: 30857
URL: http://svn.reactos.org/svn/reactos?rev=30857&view=rev Log: revert part of rev30826 that was accented committed
Modified: trunk/reactos/dll/directx/ddraw/main.c
Modified: trunk/reactos/dll/directx/ddraw/main.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main.c?re... ============================================================================== --- trunk/reactos/dll/directx/ddraw/main.c (original) +++ trunk/reactos/dll/directx/ddraw/main.c Thu Nov 29 12:56:03 2007 @@ -220,51 +220,28 @@ 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)) - { - LoadStringA(hDllModule, STR_PRIMARY_DISPLAY, (LPSTR)&strMsg, RC_STRING_MAX_SIZE); - - rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, REGSTR_PATH_DDHW, &hKey); + + DX_WINDBG_trace(); + + rc = RegOpenKeyA(HKEY_LOCAL_MACHINE, REGSTR_PATH_DDHW, &hKey); + if (rc == ERROR_SUCCESS) + { + /* 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); + if (Value != 0) + { + EnumerateAttachedSecondaries = TRUE; + privateDWFlags = DDENUM_ATTACHEDSECONDARYDEVICES; + } } - - /* 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; - } - } - - return retVal; + RegCloseKey(hKey); + } + + // not finish + return DDERR_UNSUPPORTED; }
HRESULT