https://git.reactos.org/?p=reactos.git;a=commitdiff;h=06198c51ac3bc53ca4ac09341709eebd84121951

commit 06198c51ac3bc53ca4ac09341709eebd84121951
Author:     Stanislav Motylkov <x86co...@gmail.com>
AuthorDate: Wed Aug 26 23:14:26 2020 +0300
Commit:     Stanislav Motylkov <x86co...@gmail.com>
CommitDate: Wed Aug 26 23:16:08 2020 +0300

    [SYSDM] Display system identifier when SMBIOS is not available
    
    Actual for NEC PC-98 and Original Xbox ports.
---
 dll/cpl/sysdm/general.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/dll/cpl/sysdm/general.c b/dll/cpl/sysdm/general.c
index d56677574fe..870ec299c1b 100644
--- a/dll/cpl/sysdm/general.c
+++ b/dll/cpl/sysdm/general.c
@@ -156,7 +156,7 @@ LRESULT CALLBACK RosImageProc(HWND hwnd, UINT uMsg, WPARAM 
wParam, LPARAM lParam
                     if (hDC == NULL)
                         goto Cleanup;
 
-                                       top = 0;
+                    top = 0;
                     offset = 0;
                     hCreditsDC = CreateCompatibleDC(hDC);
                     hLogoDC = CreateCompatibleDC(hCreditsDC);
@@ -445,6 +445,7 @@ static VOID SetProcSpeed(HWND hwnd, HKEY hKey, LPTSTR 
Value, UINT uID)
 static VOID GetSystemInformation(HWND hwnd)
 {
     HKEY hKey;
+    TCHAR SysKey[] = _T("HARDWARE\\DESCRIPTION\\System");
     TCHAR ProcKey[] = _T("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
     MEMORYSTATUSEX MemStat;
     TCHAR Buf[32];
@@ -460,6 +461,15 @@ static VOID GetSystemInformation(HWND hwnd)
         SetDlgItemText(hwnd, CurMachineLine, SMBiosName);
         CurMachineLine++;
     }
+    else
+    {
+        /* If SMBIOS is not available, use System Identifier */
+        if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, SysKey, 0, KEY_READ, &hKey) == 
ERROR_SUCCESS)
+        {
+            SetRegTextData(hwnd, hKey, _T("Identifier"), CurMachineLine);
+            CurMachineLine++;
+        }
+    }
     /*
      * Get Processor information
      * although undocumented, this information is being pulled

Reply via email to