sry
This commit is contained in:
parent
0ff729c060
commit
7ee148b3b9
|
|
@ -14,7 +14,6 @@
|
||||||
// OS-Specific code
|
// OS-Specific code
|
||||||
#if windows
|
#if windows
|
||||||
#define SECURITY_WIN32
|
#define SECURITY_WIN32
|
||||||
#include <cstring>
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
#include <security.h>
|
#include <security.h>
|
||||||
|
|
@ -254,16 +253,7 @@ Oneshot::Oneshot(RGSSThreadData &threadData) : threadData(threadData){
|
||||||
const char* path = SDL_GetUserFolder(SDL_FOLDER_DOCUMENTS);
|
const char* path = SDL_GetUserFolder(SDL_FOLDER_DOCUMENTS);
|
||||||
p->docsPath = path;
|
p->docsPath = path;
|
||||||
#ifdef windows
|
#ifdef windows
|
||||||
const char* suffix = "\\My Games";
|
p->gamePath = std::string(path) + "\\My Games";
|
||||||
|
|
||||||
size_t len = std::strlen(path) + std::strlen(suffix) + 1;
|
|
||||||
p->gamePath = (char*)SDL_malloc(len);
|
|
||||||
|
|
||||||
if (p->gamePath) {
|
|
||||||
std::strcpy(p->gamePath, path);
|
|
||||||
std::strcat(p->gamePath, suffix);
|
|
||||||
}
|
|
||||||
SDL_free((void*)path);
|
|
||||||
#else
|
#else
|
||||||
p->gamePath = path;
|
p->gamePath = path;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue