should fix remaining build errors on linux...

This commit is contained in:
shuffle2 2010-03-15 20:44:20 +00:00
parent 9382a1307c
commit eca4821498
3 changed files with 15 additions and 24 deletions

View File

@ -20,6 +20,7 @@
#include "../common/Port.h"
#include "../System.h"
#include "agbprint.h"
#include "GBALink.h"
#ifdef PROFILING
#include "prof/prof.h"
@ -31,15 +32,6 @@
extern int emulating;
#include "GBALink.h"
extern int linktime;
extern void StartLink(u16);
extern void StartGPLink(u16);
extern void LinkSSend(u16);
extern void LinkUpdate(int);
extern int linktime2;
extern bool linkenable;
int SWITicks = 0;
int IRQTicks = 0;
@ -2796,10 +2788,8 @@ void CPUUpdateRegister(u32 address, u16 value)
break;
case COMM_SIODATA8:
#ifdef _MSC_VER
if (gba_link_enabled && lspeed)
if (gba_link_enabled)
LinkSSend(value);
#endif
UPDATE_REG(COMM_RCNT, value);
break;
@ -3433,12 +3423,10 @@ void CPULoop(int ticks)
int timerOverflow = 0;
// variable used by the CPU core
cpuTotalTicks = 0;
#ifdef _MSC_VER
// shuffle2: what's the purpose?
if(gba_link_enabled)
cpuNextEvent = 1;
#endif
cpuBreakLoop = false;
cpuNextEvent = CPUUpdateTicks();
@ -3898,10 +3886,8 @@ void CPULoop(int ticks)
if (gba_joybus_enabled)
JoyBusUpdate(clockTicks);
#ifdef _MSC_VER
if (gba_link_enabled)
LinkUpdate(clockTicks);
#endif
cpuNextEvent = CPUUpdateTicks();
@ -3917,11 +3903,9 @@ void CPULoop(int ticks)
goto updateLoop;
}
#ifdef _MSC_VER
// shuffle2: what's the purpose?
if(gba_link_enabled)
cpuNextEvent = 1;
#endif
if(IF && (IME & 1) && armIrqEnable) {
int res = IF & IE;

View File

@ -23,10 +23,10 @@ bool gba_joybus_enabled = false;
GBASockClient* dol = NULL;
sf::IPAddress joybusHostAddr = sf::IPAddress::LocalHost;
#ifdef _MSC_VER
// If disabled, gba core won't call any (non-joybus) link functions
bool gba_link_enabled = false;
#ifdef _MSC_VER
// Hodgepodge
u8 tspeed = 3;
u8 transfer = 0;
@ -40,7 +40,6 @@ static int i, j;
int linktimeout = 1000;
LANLINKDATA lanlink;
u16 linkdata[4];
int lspeed = 0;
lserver ls;
lclient lc;
bool oncewait = false, after = false;

View File

@ -121,8 +121,13 @@ extern void JoyBusConnect();
extern void JoyBusShutdown();
extern void JoyBusUpdate(int ticks);
extern bool gba_link_enabled;
#ifdef _MSC_VER
extern void LinkUpdate();
extern void StartLink(u16);
extern void StartGPLink(u16);
extern void LinkSSend(u16);
extern void LinkUpdate(int);
extern void LinkChildStop();
extern void LinkChildSend(u16);
extern void CloseLanLink();
@ -130,9 +135,12 @@ extern char *MakeInstanceFilename(const char *Input);
extern LANLINKDATA lanlink;
extern int vbaid;
extern bool rfu_enabled;
extern bool gba_link_enabled;
extern int linktimeout;
extern lclient lc;
extern int linkid;
extern int lspeed;
#else // These are stubbed for now
inline void StartLink(u16){}
inline void StartGPLink(u16){}
inline void LinkSSend(u16){}
inline void LinkUpdate(int){}
#endif