mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement DXUTSetMediaSearchPath(...)
This commit is contained in:
parent
cb0177debc
commit
1e0ce73275
@ -190,3 +190,26 @@ LPCTSTR DXUTGetMediaSearchPath()
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
HRESULT DXUTSetMediaSearchPath( LPCTSTR strPath )
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
TCHAR* s_strSearchPath = DXUTMediaSearchPath();
|
||||
|
||||
hr = StringCchCopy( s_strSearchPath, MAX_PATH, strPath );
|
||||
if( SUCCEEDED(hr) )
|
||||
{
|
||||
// append slash if needed
|
||||
size_t ch;
|
||||
hr = StringCchLength( s_strSearchPath, MAX_PATH, &ch );
|
||||
if( SUCCEEDED(hr) && s_strSearchPath[ch-1] != L'\\')
|
||||
{
|
||||
hr = StringCchCat( s_strSearchPath, MAX_PATH, "\\" );
|
||||
}
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,6 +21,10 @@
|
||||
#include <stdio.h>
|
||||
#include <multimon.h>
|
||||
|
||||
|
||||
#define STRSAFE_NO_DEPRECATE
|
||||
#include <strsafe.h>
|
||||
|
||||
#include "DXUTmisc.h"
|
||||
|
||||
#endif // !defined(DXSDK_STDAFX_H)
|
||||
|
Loading…
Reference in New Issue
Block a user