fix build on windows, mkIII
This commit is contained in:
parent
77fe9d0121
commit
d4b1a6c58c
3 changed files with 12 additions and 2 deletions
|
@ -187,7 +187,7 @@ stratagus-game-launcher.h - Stratagus Game Launcher
|
|||
|
||||
static void SetUserDataPath(char* data_path) {
|
||||
#if defined(WIN32)
|
||||
SHGetFolderPath(NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL, 0, data_path);
|
||||
SHGetFolderPathA(NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL, 0, data_path);
|
||||
// strcpy(data_path, getenv("APPDATA"));
|
||||
#else
|
||||
strcpy(data_path, getenv("HOME"));
|
||||
|
|
|
@ -49,6 +49,12 @@ void copy_dir(const char* source_folder, const char* target_folder);
|
|||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
// set everything to winxp sp2 compatiblity
|
||||
#define NTDDI_VERSION 0x05010300
|
||||
#define _WIN32_WINNT 0x0502
|
||||
#define WINVER 0x0502
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX MAX_PATH
|
||||
#endif
|
||||
|
|
|
@ -36,6 +36,10 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#ifdef USE_WIN32
|
||||
// set everything to winxp sp2 compatiblity
|
||||
#define NTDDI_VERSION 0x05010300
|
||||
#define _WIN32_WINNT 0x0502
|
||||
#define WINVER 0x0502
|
||||
#include <Shlobj.h>
|
||||
#endif
|
||||
|
||||
|
@ -56,7 +60,7 @@ void Parameters::SetDefaultUserDirectory()
|
|||
userDirectory = StratagusLibPath;
|
||||
#elif USE_WIN32
|
||||
char data_path[4096] = {'\0'};
|
||||
SHGetFolderPath(NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL, 0, data_path);
|
||||
SHGetFolderPathA(NULL, CSIDL_PERSONAL|CSIDL_FLAG_CREATE, NULL, 0, data_path);
|
||||
userDirectory = data_path;
|
||||
// userDirectory = getenv("APPDATA");
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue