diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c index 7667740a90..e4c03dd13b 100644 --- a/frontend/drivers/platform_win32.c +++ b/frontend/drivers/platform_win32.c @@ -19,18 +19,33 @@ #include #include +#include "../general.h" + +static void frontend_win32_get_os(char *name, size_t sizeof_name, int *major, int *minor) +{ + DWORD version = GetVersion(); + + *major = (DWORD)(LOBYTE(LOWORD(version))); + *minor = (DWORD)(HIBYTE(LOWORD(version))); +} + +static void frontend_win32_environment_get(int *argc, char *argv[], + void *args, void *params_data) +{ +} + const frontend_ctx_driver_t frontend_ctx_win32 = { - NULL, /* environment_get */ - NULL, /* init */ - NULL, /* deinit */ - NULL, /* exitspawn */ - NULL, /* process_args */ - NULL, /* exec */ - NULL, /* set_fork */ - NULL, /* shutdown */ - NULL, /* get_name */ - NULL, /* get_os */ - NULL, /* get_rating */ - NULL, /* load_content */ + frontend_win32_environment_get, /* environment_get */ + NULL, /* init */ + NULL, /* deinit */ + NULL, /* exitspawn */ + NULL, /* process_args */ + NULL, /* exec */ + NULL, /* set_fork */ + NULL, /* shutdown */ + NULL, /* get_name */ + frontend_win32_get_os, /* get_os */ + NULL, /* get_rating */ + NULL, /* load_content */ "win32", }; diff --git a/frontend/frontend_driver.h b/frontend/frontend_driver.h index ecf2b31991..4fb82bdea8 100644 --- a/frontend/frontend_driver.h +++ b/frontend/frontend_driver.h @@ -44,7 +44,7 @@ typedef struct frontend_ctx_driver void (*set_fork)(bool exitspawn, bool start_game); void (*shutdown)(bool); void (*get_name)(char *, size_t); - void (*get_os)(char *, size_t); + void (*get_os)(char *, size_t, int *major, int *minor); int (*get_rating)(void); void (*content_loaded)(void);