FR: Implement SystemStats::getDeviceDescription() on Windows

windows

#1

In juce_win32_SystemStats.cpp:

String SystemStats::getDeviceDescription()
{
   #if WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
    return "Windows (Desktop)";
   #elif WINAPI_FAMILY == WINAPI_FAMILY_PC_APP
    return "Windows (Store)";
   #elif WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
    return "Windows (Phone)";
   #elif WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM
    return "Windows (System)";
   #elif WINAPI_FAMILY == WINAPI_FAMILY_SERVER
    return "Windows (Server)";
   #else
    return "Windows (Unknown Platform)";
   #endif
}

Note that I’m unsure if these macros exist in systems below Windows 8.1.


#2

Bump


#3

Hmmm, I don’t think JUCE supports half of those platforms. Does this really make sense for JUCE apps?


#4

I simply went the whole way and covered all cases.

If that’s unsatisfactory, I’ll leave it up to you to tweak as necessary.


#5

OK makes sense. However, many versions of VS will not have those defined and fallback to “Windows (Unknown Platform)” which might be quite ugly for a lot of users. Is it ok if it fallbacks to just “Windows”?


#6

Works for me.


#7

OK. It’s now on develop with commit 52fb43b.


#8

Awesome, thanks!