mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
[devcpux]
tabs to spaces svn path=/trunk/; revision=61710
This commit is contained in:
parent
ab31c6fa77
commit
b3e4b3bf5d
1 changed files with 66 additions and 66 deletions
|
@ -27,17 +27,17 @@ BOOL
|
||||||
APIENTRY
|
APIENTRY
|
||||||
DllMain (HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
|
DllMain (HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
|
||||||
{
|
{
|
||||||
switch (dwReason)
|
switch (dwReason)
|
||||||
{
|
{
|
||||||
case DLL_THREAD_ATTACH:
|
case DLL_THREAD_ATTACH:
|
||||||
case DLL_THREAD_DETACH:
|
case DLL_THREAD_DETACH:
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hInstance = (HINSTANCE) hInstance;
|
g_hInstance = (HINSTANCE) hInstance;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,84 +45,84 @@ BOOL
|
||||||
APIENTRY
|
APIENTRY
|
||||||
PropSheetExtProc(PSP_PROPSHEETPAGE_REQUEST PropPageRequest, LPFNADDPROPSHEETPAGE fAddFunc, LPARAM lParam)
|
PropSheetExtProc(PSP_PROPSHEETPAGE_REQUEST PropPageRequest, LPFNADDPROPSHEETPAGE fAddFunc, LPARAM lParam)
|
||||||
{
|
{
|
||||||
PROPSHEETPAGE PropSheetPage;
|
PROPSHEETPAGE PropSheetPage;
|
||||||
HPROPSHEETPAGE hPropSheetPage;
|
HPROPSHEETPAGE hPropSheetPage;
|
||||||
|
|
||||||
if(PropPageRequest->PageRequested != SPPSR_ENUM_ADV_DEVICE_PROPERTIES)
|
if(PropPageRequest->PageRequested != SPPSR_ENUM_ADV_DEVICE_PROPERTIES)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if ((!PropPageRequest->DeviceInfoSet) || (!PropPageRequest->DeviceInfoData))
|
if ((!PropPageRequest->DeviceInfoSet) || (!PropPageRequest->DeviceInfoData))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
ZeroMemory(&PropSheetPage, sizeof(PROPSHEETPAGE));
|
ZeroMemory(&PropSheetPage, sizeof(PROPSHEETPAGE));
|
||||||
PropSheetPage.dwSize = sizeof(PROPSHEETPAGE);
|
PropSheetPage.dwSize = sizeof(PROPSHEETPAGE);
|
||||||
PropSheetPage.hInstance = g_hInstance;
|
PropSheetPage.hInstance = g_hInstance;
|
||||||
PropSheetPage.pszTemplate = MAKEINTRESOURCE(DLG_PROCESSORINFO);
|
PropSheetPage.pszTemplate = MAKEINTRESOURCE(DLG_PROCESSORINFO);
|
||||||
PropSheetPage.pfnDlgProc = ProcessorDlgProc;
|
PropSheetPage.pfnDlgProc = ProcessorDlgProc;
|
||||||
|
|
||||||
hPropSheetPage = CreatePropertySheetPage(&PropSheetPage);
|
hPropSheetPage = CreatePropertySheetPage(&PropSheetPage);
|
||||||
if(!hPropSheetPage)
|
if(!hPropSheetPage)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if(!(fAddFunc)(hPropSheetPage, lParam)) {
|
if(!(fAddFunc)(hPropSheetPage, lParam)) {
|
||||||
DestroyPropertySheetPage (hPropSheetPage);
|
DestroyPropertySheetPage (hPropSheetPage);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AddFeature(WCHAR* szFeatures, WCHAR* Feature, BOOL* bFirst)
|
AddFeature(WCHAR* szFeatures, WCHAR* Feature, BOOL* bFirst)
|
||||||
{
|
{
|
||||||
if (!*bFirst)
|
if (!*bFirst)
|
||||||
wcscat(szFeatures, L", ");
|
wcscat(szFeatures, L", ");
|
||||||
*bFirst = FALSE;
|
*bFirst = FALSE;
|
||||||
wcscat(szFeatures, Feature);
|
wcscat(szFeatures, Feature);
|
||||||
}
|
}
|
||||||
|
|
||||||
INT_PTR
|
INT_PTR
|
||||||
CALLBACK
|
CALLBACK
|
||||||
ProcessorDlgProc (HWND hDlg, UINT uMessage, WPARAM wParam, LPARAM lParam)
|
ProcessorDlgProc (HWND hDlg, UINT uMessage, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
switch (uMessage) {
|
switch (uMessage) {
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
{
|
{
|
||||||
WCHAR szFeatures[MAX_PATH] = L"";
|
WCHAR szFeatures[MAX_PATH] = L"";
|
||||||
WCHAR szModel[3];
|
WCHAR szModel[3];
|
||||||
WCHAR szStepping[3];
|
WCHAR szStepping[3];
|
||||||
WCHAR szCurrentMhz[10];
|
WCHAR szCurrentMhz[10];
|
||||||
BOOL bFirst = TRUE;
|
BOOL bFirst = TRUE;
|
||||||
SYSTEM_INFO SystemInfo;
|
SYSTEM_INFO SystemInfo;
|
||||||
PROCESSOR_POWER_INFORMATION PowerInfo;
|
PROCESSOR_POWER_INFORMATION PowerInfo;
|
||||||
|
|
||||||
if (IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE))
|
if (IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE))
|
||||||
AddFeature(szFeatures, L"MMX", &bFirst);
|
AddFeature(szFeatures, L"MMX", &bFirst);
|
||||||
if (IsProcessorFeaturePresent(PF_XMMI_INSTRUCTIONS_AVAILABLE))
|
if (IsProcessorFeaturePresent(PF_XMMI_INSTRUCTIONS_AVAILABLE))
|
||||||
AddFeature(szFeatures, L"SSE", &bFirst);
|
AddFeature(szFeatures, L"SSE", &bFirst);
|
||||||
if (IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE))
|
if (IsProcessorFeaturePresent(PF_XMMI64_INSTRUCTIONS_AVAILABLE))
|
||||||
AddFeature(szFeatures, L"SSE2", &bFirst);
|
AddFeature(szFeatures, L"SSE2", &bFirst);
|
||||||
/*if (IsProcessorFeaturePresent(PF_SSE3_INSTRUCTIONS_AVAILABLE))
|
/*if (IsProcessorFeaturePresent(PF_SSE3_INSTRUCTIONS_AVAILABLE))
|
||||||
AddFeature(szFeatures, L"SSE3", &bFirst); */
|
AddFeature(szFeatures, L"SSE3", &bFirst); */
|
||||||
if (IsProcessorFeaturePresent(PF_3DNOW_INSTRUCTIONS_AVAILABLE))
|
if (IsProcessorFeaturePresent(PF_3DNOW_INSTRUCTIONS_AVAILABLE))
|
||||||
AddFeature(szFeatures, L"3DNOW", &bFirst);
|
AddFeature(szFeatures, L"3DNOW", &bFirst);
|
||||||
|
|
||||||
SetDlgItemTextW(hDlg, IDC_FEATURES, szFeatures);
|
SetDlgItemTextW(hDlg, IDC_FEATURES, szFeatures);
|
||||||
|
|
||||||
GetSystemInfo(&SystemInfo);
|
GetSystemInfo(&SystemInfo);
|
||||||
|
|
||||||
wsprintf(szModel, L"%x", HIBYTE(SystemInfo.wProcessorRevision));
|
wsprintf(szModel, L"%x", HIBYTE(SystemInfo.wProcessorRevision));
|
||||||
wsprintf(szStepping, L"%d", LOBYTE(SystemInfo.wProcessorRevision));
|
wsprintf(szStepping, L"%d", LOBYTE(SystemInfo.wProcessorRevision));
|
||||||
|
|
||||||
SetDlgItemTextW(hDlg, IDC_MODEL, szModel);
|
SetDlgItemTextW(hDlg, IDC_MODEL, szModel);
|
||||||
SetDlgItemTextW(hDlg, IDC_STEPPING, szStepping);
|
SetDlgItemTextW(hDlg, IDC_STEPPING, szStepping);
|
||||||
|
|
||||||
CallNtPowerInformation(11, NULL, 0, &PowerInfo, sizeof(PowerInfo));
|
CallNtPowerInformation(11, NULL, 0, &PowerInfo, sizeof(PowerInfo));
|
||||||
wsprintf(szCurrentMhz, L"%ld %s", PowerInfo.CurrentMhz, L"MHz");
|
wsprintf(szCurrentMhz, L"%ld %s", PowerInfo.CurrentMhz, L"MHz");
|
||||||
SetDlgItemTextW(hDlg, IDC_CORESPEED, szCurrentMhz);
|
SetDlgItemTextW(hDlg, IDC_CORESPEED, szCurrentMhz);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue