-
Notifications
You must be signed in to change notification settings - Fork 28
Description
I think we should change the default save location to Documents.
Currently, it defaults to creating a user folder under C\Program Files\. However, this isn't allowed in modern windows.
Window's creates a VirtualStore to be backwards compatible, but it's hidden from the user.
C:\Users\wjbr\AppData\Local\VirtualStore\Program Files (x86)\Microsoft Kids\USERS\wjbr
Here's where it sets up the folders.
3DMMForever/src/studio/utest.cpp
Lines 1152 to 1157 in 79b3010
| /****************************************************************************** | |
| Finds _fniUsersDir, _fniMelanieDir, and _fniUserDir. _fniUserDir is | |
| set from the registry. This function also determines if this is a first | |
| time user. | |
| ************************************************************ PETED ***********/ | |
| bool APP::_FGetUserDirectories(void) |
We can use SHGetFolderPath or SHGetKnownFolderPath to get the path of the Documents folder.
HRESULT result = SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, myDocuments);https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetfolderpatha
https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath
