mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +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);
|
||||
p->docsPath = path;
|
||||
#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
|
||||
p->gamePath = path;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue