woodruffw / screenfetch-c

A rewrite of screenFetch in C.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Desktop environment on Windows

darealshinji opened this issue · comments

The Windows version detection in detect_de() from src/plat/win32/detect.c is a bit wrong.
The version numbers don't equal exactly the release numbers: https://msdn.microsoft.com/en-us/library/ms724832%28VS.85%29.aspx

The detection should probably be more like this:

    if ((major == 6 && minor <= 1) || major == 10)
        safe_strncpy(de_str, "Aero", MAX_STRLEN);
    else if (major == 6 && minor >= 2)
        safe_strncpy(de_str, "Metro", MAX_STRLEN);
    else
        safe_strncpy(de_str, "Luna", MAX_STRLEN);

Is Windows 10's style officially "Aero"? Since MS seems to still being using the Metro guidelines/MDL, I'm tempted to classify Windows 10 as "Metro" instead.

Either way, "Luna" is definitely incorrect. Thanks for bringing this to my attention.

Try building from d5bed4d - if that works, I'll merge it.

Detects DE as Metro. Tested on Msys2.
But now I've spotted something else: Kernel is detected as Windows NT 10.0 but OS is Microsoft Windows 7, should be Windows 10 though.

It looks like Microsoft never gave Windows 10 its own NTDDI_* macro, although it's weird that it falls back to NTDDI_WIN7.

Are you using the Makefile to build screenfetch-c? I wonder if Msys2 does anything strange to the WIN_* flags during compilation...

Either way, the current "code" (really just macros) is pretty ugly. I'll replace it with GetVersionEx. something else.

Works.

OS: Microsoft Windows 10
Kernel: Windows NT 10.0 build 14393 (AMD64)

A quick lookup on Google reveals that Metro is now referred to as "Modern UI". Maybe the Windows 8/10 DE should be listed as Modern UI/Metro?

Sounds good to me. I'll have that pushed in a moment.