Fix things so that those who wish to compile with -std=c++0x can. To active this with the cmake build add CXXFLAGS="-std=c++0x" before cmake on the command line, or export that variable. This enables the experimental features like std::thread, std::mutex, etc., that are provided by g++ instead of using the implementation in dolphin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7333 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
2a694edf93
commit
1b583a0441
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__
|
#if GCC_VERSION >= GCC_VER(4,4,0) && __GXX_EXPERIMENTAL_CXX0X__
|
||||||
// GCC 4.4 provides <thread>
|
// GCC 4.4 provides <thread>
|
||||||
|
#define _GLIBCXX_USE_SCHED_YIELD
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
@ -196,7 +196,7 @@ void SysConf::GenerateSysConf()
|
||||||
// BT.DINF
|
// BT.DINF
|
||||||
current_offset += create_item(items[0], Type_BigArray, "BT.DINF", 0x460, current_offset);
|
current_offset += create_item(items[0], Type_BigArray, "BT.DINF", 0x460, current_offset);
|
||||||
items[0].data[0] = 4;
|
items[0].data[0] = 4;
|
||||||
for (unsigned int i = 0; i < 4; ++i)
|
for (u8 i = 0; i < 4; ++i)
|
||||||
{
|
{
|
||||||
const u8 bt_addr[6] = {i, 0x00, 0x79, 0x19, 0x02, 0x11};
|
const u8 bt_addr[6] = {i, 0x00, 0x79, 0x19, 0x02, 0x11};
|
||||||
memcpy(&items[0].data[1 + 70 * i], bt_addr, sizeof(bt_addr));
|
memcpy(&items[0].data[1 + 70 * i], bt_addr, sizeof(bt_addr));
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
void start(int node)
|
void start(int node)
|
||||||
{
|
{
|
||||||
m_last_start = m_ptr;
|
m_last_start = m_ptr;
|
||||||
unsigned char hdr[3] = {0xe0, node, 0};
|
unsigned char hdr[3] = {0xe0, (unsigned char)node, 0};
|
||||||
m_csum = 0;
|
m_csum = 0;
|
||||||
addData(hdr, 3, 1);
|
addData(hdr, 3, 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,7 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
|
||||||
}
|
}
|
||||||
else if (viewAsType == VIEWAS_ASCII)
|
else if (viewAsType == VIEWAS_ASCII)
|
||||||
{
|
{
|
||||||
char a[4] = {(mem_data&0xff000000)>>24,
|
u32 a[4] = {(mem_data&0xff000000)>>24,
|
||||||
(mem_data&0xff0000)>>16,
|
(mem_data&0xff0000)>>16,
|
||||||
(mem_data&0xff00)>>8,
|
(mem_data&0xff00)>>8,
|
||||||
mem_data&0xff};
|
mem_data&0xff};
|
||||||
|
|
|
@ -361,7 +361,7 @@ u32 AnalyzeAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
||||||
num_draw_call++;
|
num_draw_call++;
|
||||||
const int tc[12] = {
|
const int tc[12] = {
|
||||||
g_VtxDesc.Position, g_VtxDesc.Normal, g_VtxDesc.Color0, g_VtxDesc.Color1, g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord,
|
g_VtxDesc.Position, g_VtxDesc.Normal, g_VtxDesc.Color0, g_VtxDesc.Color1, g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord,
|
||||||
g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord, g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (g_VtxDesc.Hex >> 31) & 3
|
g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord, g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const int)((g_VtxDesc.Hex >> 31) & 3)
|
||||||
};
|
};
|
||||||
for(int i = 0; i < 12; i++)
|
for(int i = 0; i < 12; i++)
|
||||||
{
|
{
|
||||||
|
@ -562,7 +562,7 @@ void CompileAndRunDisplayList(u32 address, u32 size, CachedDisplayList *dl)
|
||||||
}
|
}
|
||||||
const int tc[12] = {
|
const int tc[12] = {
|
||||||
g_VtxDesc.Position, g_VtxDesc.Normal, g_VtxDesc.Color0, g_VtxDesc.Color1, g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord,
|
g_VtxDesc.Position, g_VtxDesc.Normal, g_VtxDesc.Color0, g_VtxDesc.Color1, g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord,
|
||||||
g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord, g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (g_VtxDesc.Hex >> 31) & 3
|
g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord, g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const int)((g_VtxDesc.Hex >> 31) & 3)
|
||||||
};
|
};
|
||||||
for(int i = 0; i < 12; i++)
|
for(int i = 0; i < 12; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -248,7 +248,7 @@ void VertexLoader::CompileVertexTranslator()
|
||||||
// 01 become 00, and 10/11 become 01
|
// 01 become 00, and 10/11 become 01
|
||||||
const int tc[8] = {
|
const int tc[8] = {
|
||||||
m_VtxDesc.Tex0Coord, m_VtxDesc.Tex1Coord, m_VtxDesc.Tex2Coord, m_VtxDesc.Tex3Coord,
|
m_VtxDesc.Tex0Coord, m_VtxDesc.Tex1Coord, m_VtxDesc.Tex2Coord, m_VtxDesc.Tex3Coord,
|
||||||
m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, (m_VtxDesc.Hex >> 31) & 3
|
m_VtxDesc.Tex4Coord, m_VtxDesc.Tex5Coord, m_VtxDesc.Tex6Coord, (const int)((m_VtxDesc.Hex >> 31) & 3)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Reset pipeline
|
// Reset pipeline
|
||||||
|
|
|
@ -83,7 +83,7 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
|
||||||
// TextureCoord
|
// TextureCoord
|
||||||
const int tcDesc[8] = {
|
const int tcDesc[8] = {
|
||||||
g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord, g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord,
|
g_VtxDesc.Tex0Coord, g_VtxDesc.Tex1Coord, g_VtxDesc.Tex2Coord, g_VtxDesc.Tex3Coord,
|
||||||
g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (g_VtxDesc.Hex >> 31) & 3
|
g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const int)((g_VtxDesc.Hex >> 31) & 3)
|
||||||
};
|
};
|
||||||
const int tcElements[8] = {
|
const int tcElements[8] = {
|
||||||
m_CurrentVat->g0.Tex0CoordElements, m_CurrentVat->g1.Tex1CoordElements, m_CurrentVat->g1.Tex2CoordElements,
|
m_CurrentVat->g0.Tex0CoordElements, m_CurrentVat->g1.Tex1CoordElements, m_CurrentVat->g1.Tex2CoordElements,
|
||||||
|
|
Loading…
Reference in New Issue