fix win32-build for assimp_viewer .

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>
This commit is contained in:
Kim Kulling
2015-04-17 20:02:55 +02:00
parent f435712273
commit 76dd9467b2
24 changed files with 4278 additions and 4158 deletions

View File

@@ -39,12 +39,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------------------------
*/
#include "stdafx.h"
#include "assimp_view.h"
#include <assimp/Exporter.hpp>
#include <algorithm>
#include <windowsx.h>
namespace AssimpView {
using namespace Assimp;
// Static array to keep custom color values
COLORREF g_aclCustomColors[16] = {0};
@@ -1044,9 +1048,9 @@ void DoExport(size_t formatId)
ai_assert(strlen(szFileName) <= MAX_PATH);
// invent a nice default file name
char* sz = std::max(strrchr(szFileName,'\\'),strrchr(szFileName,'/'));
char* sz = max(strrchr(szFileName,'\\'),strrchr(szFileName,'/'));
if (sz) {
strncpy(sz,std::max(strrchr(g_szFileName,'\\'),strrchr(g_szFileName,'/')),MAX_PATH);
strncpy(sz,max(strrchr(g_szFileName,'\\'),strrchr(g_szFileName,'/')),MAX_PATH);
}
}
else {