mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[host] windows: report windows version information
This commit is contained in:
parent
ccdf7b7c0e
commit
db3d20f935
@ -41,6 +41,7 @@
|
|||||||
#include "common/locking.h"
|
#include "common/locking.h"
|
||||||
#include "common/thread.h"
|
#include "common/thread.h"
|
||||||
#include "common/time.h"
|
#include "common/time.h"
|
||||||
|
#include "common/stringutils.h"
|
||||||
|
|
||||||
#define ID_MENU_SHOW_LOG 3000
|
#define ID_MENU_SHOW_LOG 3000
|
||||||
#define ID_MENU_EXIT 3001
|
#define ID_MENU_EXIT 3001
|
||||||
@ -56,6 +57,7 @@ struct AppState
|
|||||||
|
|
||||||
char executable[MAX_PATH + 1];
|
char executable[MAX_PATH + 1];
|
||||||
char systemLogDir[MAX_PATH];
|
char systemLogDir[MAX_PATH];
|
||||||
|
char * osVersion;
|
||||||
HWND messageWnd;
|
HWND messageWnd;
|
||||||
NOTIFYICONDATA iconData;
|
NOTIFYICONDATA iconData;
|
||||||
UINT trayRestartMsg;
|
UINT trayRestartMsg;
|
||||||
@ -448,6 +450,8 @@ shutdown:
|
|||||||
|
|
||||||
finish:
|
finish:
|
||||||
|
|
||||||
|
free(app.osVersion);
|
||||||
|
|
||||||
for(int i = 0; i < app.argc; ++i)
|
for(int i = 0; i < app.argc; ++i)
|
||||||
free(app.argv[i]);
|
free(app.argv[i]);
|
||||||
free(app.argv);
|
free(app.argv);
|
||||||
@ -613,8 +617,23 @@ KVMFROS os_getKVMFRType(void)
|
|||||||
|
|
||||||
const char * os_getOSName(void)
|
const char * os_getOSName(void)
|
||||||
{
|
{
|
||||||
//TODO
|
if (app.osVersion)
|
||||||
return NULL;
|
return app.osVersion;
|
||||||
|
|
||||||
|
OSVERSIONINFOA osvi = { 0 };
|
||||||
|
osvi.dwOSVersionInfoSize = sizeof(osvi);
|
||||||
|
GetVersionExA(&osvi);
|
||||||
|
|
||||||
|
alloc_sprintf(
|
||||||
|
&app.osVersion,
|
||||||
|
"Windows %lu.%lu (Build: %lu) %s",
|
||||||
|
osvi.dwMajorVersion,
|
||||||
|
osvi.dwMinorVersion,
|
||||||
|
osvi.dwBuildNumber,
|
||||||
|
osvi.szCSDVersion
|
||||||
|
);
|
||||||
|
|
||||||
|
return app.osVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TABLE_SIG(x) (\
|
#define TABLE_SIG(x) (\
|
||||||
|
Loading…
Reference in New Issue
Block a user