llrender and lldir merge. Removed duplicate assets from skins. cleaned up skin textures.xml files to only include changes from default.

This commit is contained in:
Shyotl
2016-04-11 02:51:08 -05:00
parent d40256fb31
commit be5d2f20bc
1280 changed files with 2354 additions and 10692 deletions

View File

@@ -48,60 +48,28 @@ LLDir_Win32::LLDir_Win32()
WCHAR w_str[MAX_PATH];
HRESULT (WINAPI* pSHGetKnownFolderPath)(REFKNOWNFOLDERID rfid, DWORD dwFlags, HANDLE hToken, PWSTR *ppszPath) = NULL;
HMODULE shell = LoadLibrary(L"shell32");
if(shell) //SHGetSpecialFolderPath is deprecated from Vista an onwards. Try to use SHGetKnownFolderPath if it's available
{
pSHGetKnownFolderPath = (HRESULT (WINAPI *)(REFKNOWNFOLDERID, DWORD, HANDLE, PWSTR *))GetProcAddress(shell, "SHGetKnownFolderPath");
}
WCHAR* pPath = NULL;
if(SHGetKnownFolderPath(FOLDERID_RoamingAppData, 0, NULL, &pPath) == S_OK)
wcscpy_s(w_str, pPath);
// Application Data is where user settings go
if(pSHGetKnownFolderPath)
{
WCHAR* pPath = NULL;
if((*pSHGetKnownFolderPath)(FOLDERID_RoamingAppData, 0, NULL, &pPath) == S_OK)
wcscpy_s(w_str,pPath);
else
SHGetFolderPath(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_DEFAULT, w_str );
if(pPath)
CoTaskMemFree(pPath);
}
else //XP doesn't support SHGetKnownFolderPath
{
SHGetFolderPath(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_DEFAULT, w_str );
}
CoTaskMemFree(pPath);
pPath = NULL;
mOSUserDir = utf16str_to_utf8str(llutf16string(w_str));
// We want cache files to go on the local disk, even if the
// user is on a network with a "roaming profile".
//
// On XP this is:
// C:\Docments and Settings\James\Local Settings\Application Data
// On Vista this is:
// C:\Users\James\AppData\Local
// On Vista and above this is:
// C:\Users\<USERNAME>\AppData\Local
//
// We used to store the cache in AppData\Roaming, and the installer
// cleans up that version on upgrade. JC
if(SHGetKnownFolderPath(FOLDERID_LocalAppData, 0, NULL, &pPath) == S_OK)
wcscpy_s(w_str, pPath);
if(pSHGetKnownFolderPath)
{
WCHAR* pPath = NULL;
if((*pSHGetKnownFolderPath)(FOLDERID_LocalAppData, 0, NULL, &pPath) == S_OK)
wcscpy_s(w_str,pPath);
else
SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_DEFAULT, w_str );
if(pPath)
CoTaskMemFree(pPath);
}
else //XP doesn't support SHGetKnownFolderPath
{
SHGetFolderPath(NULL, CSIDL_LOCAL_APPDATA | CSIDL_FLAG_CREATE, NULL, SHGFP_TYPE_DEFAULT, w_str );
}
if(shell)
FreeLibrary(shell);
CoTaskMemFree(pPath);
pPath = NULL;
mOSCacheDir = utf16str_to_utf8str(llutf16string(w_str));
@@ -288,7 +256,7 @@ std::string LLDir_Win32::getCurPath()
}
BOOL LLDir_Win32::fileExists(const std::string &filename) const
bool LLDir_Win32::fileExists(const std::string &filename) const
{
llstat stat_data;
// Check the age of the file