Permalink
Browse files

Merge pull request #1324 from Karlson2k/VS2012_compat

[win32] Make source code compatible with VS2012
  • Loading branch information...
jmarshallnz committed Aug 26, 2012
2 parents 7a59fd7 + f1df3a0 commit 1e96c842aba006fbe49b8fcaa93585ff59e74127
View
@@ -55,7 +55,7 @@
#include <dir.h>
#endif
#ifdef _MSC_VER
- #define for if (0) ; else for
+// #define for if (0) ; else for
#ifndef _WIN_CE
#include <direct.h>
#endif
@@ -855,6 +855,7 @@ int CalculateMinutes( int seconds )
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
+#if _MSC_VER < 1700
DWORD64 ntohll(DWORD64 llValue)
{
DWORD64 retval = 0;
@@ -884,7 +885,7 @@ DWORD64 ntohll(DWORD64 llValue)
return retval;
}
-
+#endif // _MSC_VER < 1700
//-------------------------------------------------------------------------
void ConvertProgramInfoEndian(struct tagProgramInfo * strProgramInfo)
{
@@ -665,7 +665,7 @@ void CPartyModeManager::AddToHistory(int type, int songID)
{
while (m_history.size() >= m_songsInHistory && m_songsInHistory)
m_history.erase(m_history.begin());
- m_history.push_back(make_pair<int,int>(type,songID));
+ m_history.push_back(make_pair(type,songID));
}
void CPartyModeManager::GetRandomSelection(vector< pair<int,int> >& in, unsigned int number, vector< pair<int,int> >& out)
@@ -268,7 +268,7 @@ bool CAddonDatabase::GetAddon(int id, AddonPtr& addon)
m_pDS2->query(sql.c_str());
while (!m_pDS2->eof())
{
- props.dependencies.insert(make_pair(m_pDS2->fv(0).get_asString(), make_pair(m_pDS2->fv(1).get_asString(), m_pDS2->fv(2).get_asBool())));
+ props.dependencies.insert(make_pair(m_pDS2->fv(0).get_asString(), make_pair(AddonVersion(m_pDS2->fv(1).get_asString()), m_pDS2->fv(2).get_asBool())));
m_pDS2->next();
}
@@ -82,9 +82,11 @@ DEFINE_GUID(DXVADDI_Intel_ModeH264_C, 0x604F8E66,0x4951,0x4c54,0x88,0xFE,0xAB,0x
DEFINE_GUID(DXVADDI_Intel_ModeH264_E, 0x604F8E68,0x4951,0x4c54,0x88,0xFE,0xAB,0xD2,0x5C,0x15,0xB3,0xD6);
DEFINE_GUID(DXVADDI_Intel_ModeVC1_E , 0xBCC5DB6D,0xA2B6,0x4AF0,0xAC,0xE4,0xAD,0xB1,0xF7,0x87,0xBC,0x89);
+#if _MSC_VER < 1700
DEFINE_GUID(DXVA_ModeMPEG2and1_VLD, 0x86695f12,0x340e,0x4f04,0x9f,0xd3,0x92,0x53,0xdd,0x32,0x74,0x60);
// When exposed by an accelerator, indicates compliance with the August 2010 spec update
DEFINE_GUID(DXVA_ModeVC1_D2010, 0x1b81beA4,0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
+#endif
typedef struct {
const char *name;
View
@@ -24,11 +24,19 @@
#endif
#ifdef TARGET_WINDOWS
#define TIXML_USE_STL
+#if _MSC_VER < 1700
#ifdef _DEBUG
#pragma comment(lib, "tinyxmlSTLd.lib")
#else
#pragma comment(lib, "tinyxmlSTL.lib")
#endif
+#else // _MSC_VER < 1700
+#ifdef _DEBUG
+#pragma comment(lib, "tinyxmlSTL11d.lib")
+#else
+#pragma comment(lib, "tinyxmlSTL11.lib")
+#endif
+#endif // _MSC_VER < 1700
#else
//compile fix for TinyXml < 2.6.0
#define DOCUMENT TINYXML_DOCUMENT

0 comments on commit 1e96c84

Please sign in to comment.