Another creeping wx dependency via NetPlay.

Is nowx worth maintaining?


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5546 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-05-30 07:09:09 +00:00
parent 77894f0fe6
commit 2245b1040f
1 changed files with 21 additions and 19 deletions

View File

@ -402,27 +402,14 @@ void CEXIIPL::TransferByte(u8& _uByte)
u32 CEXIIPL::GetGCTime()
{
const u32 cJanuary2000 = 0x386D42C0; // Seconds between 1.1.1970 and 1.1.2000
u64 ltime = 0;
const u32 cJanuary2000 = 0x386D42C0; // Seconds between 1.1.1970 and 1.1.2000
const u32 cWiiBias = 0x0F111566; // Seconds between 1.1.2000 and 5.1.2008 (Wii epoch)
// (mb2): I think we can get rid of the IPL bias.
// I know, it's another hack so I let the previous code for a while.
#if 0
// Get SRAM bias
u32 Bias;
for (int i=0; i<4; i++)
{
((u8*)&Bias)[i] = sram_dump[0xc + (i^3)];
}
// Get the time ...
u64 ltime = Common::Timer::GetTimeSinceJan1970();
return ((u32)ltime - cJanuary2000 - Bias);
#else
#if defined(HAVE_WX) && HAVE_WX
// hack in some netplay stuff
u64 ltime = NetPlay_GetGCTime();
ltime = NetPlay_GetGCTime();
#endif
if (0 == ltime)
ltime = Common::Timer::GetLocalTimeSinceJan1970();
@ -430,6 +417,21 @@ u32 CEXIIPL::GetGCTime()
return ((u32)ltime - cJanuary2000 - cWiiBias/* + 32434790*/);
else
return ((u32)ltime - cJanuary2000);
#if 0
// (mb2): I think we can get rid of the IPL bias.
// I know, it's another hack so I let the previous code for a while.
// Get SRAM bias
u32 Bias;
for (int i=0; i<4; i++)
{
((u8*)&Bias)[i] = sram_dump[0xc + (i^3)];
}
// Get the time ...
u64 ltime = Common::Timer::GetTimeSinceJan1970();
return ((u32)ltime - cJanuary2000 - Bias);
#endif
}