Brendan McGrath : wineboot: Fix PROCESSOR_ARCHITECTURE reg value.

Alexandre Julliard julliard at winehq.org
Mon Feb 11 16:12:09 CST 2019


Module: wine
Branch: master
Commit: 4cd78c35072b1b118727a02aa22c51ed0516a0a8
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4cd78c35072b1b118727a02aa22c51ed0516a0a8

Author: Brendan McGrath <brendan at redmandi.com>
Date:   Sat Feb  9 15:06:29 2019 +1100

wineboot: Fix PROCESSOR_ARCHITECTURE reg value.

On my Windows machine, PROCESSOR_ARCHITECTURE has the value "AMD64",
but under wine (since 4.1) the value is "Intel64".

Signed-off-by: Brendan McGrath <brendan at redmandi.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/wineboot/wineboot.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
index 32e4225..b85a3b6 100644
--- a/programs/wineboot/wineboot.c
+++ b/programs/wineboot/wineboot.c
@@ -422,7 +422,7 @@ static void create_environment_registry_keys( void )
     HKEY env_key;
     SYSTEM_CPU_INFORMATION sci;
     WCHAR buffer[60], vendorid[13];
-    const WCHAR *arch;
+    const WCHAR *arch, *parch;
 
     if (RegCreateKeyW( HKEY_LOCAL_MACHINE, EnvironW, &env_key )) return;
 
@@ -435,12 +435,13 @@ static void create_environment_registry_keys( void )
     switch (sci.Architecture)
     {
     case PROCESSOR_ARCHITECTURE_AMD64:
-        arch = !strcmpW(vendorid, authenticamdW) ? amd64W : intel64W;
+        arch = amd64W;
+        parch = !strcmpW(vendorid, authenticamdW) ? amd64W : intel64W;
         break;
 
     case PROCESSOR_ARCHITECTURE_INTEL:
     default:
-        arch = x86W;
+        arch = parch = x86W;
         break;
     }
     set_reg_value( env_key, ProcArchW, arch );
@@ -455,7 +456,7 @@ static void create_environment_registry_keys( void )
     case PROCESSOR_ARCHITECTURE_AMD64:
     case PROCESSOR_ARCHITECTURE_INTEL:
     default:
-        get_identifier( buffer, arch );
+        get_identifier( buffer, parch );
         strcatW( buffer, commaW );
         strcatW( buffer, vendorid );
         break;




More information about the wine-cvs mailing list