mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
windows docs path fix
This commit is contained in:
parent
04a9689320
commit
26fb318f41
1 changed files with 10 additions and 1 deletions
|
|
@ -253,7 +253,16 @@ 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
|
||||||
p->gamePath = path "\\My Games";
|
const char* suffix = "\\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 a new issue