summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2016-04-11 21:43:20 +0200
committerPierre Bourdon <delroth@gmail.com>2016-04-11 21:43:20 +0200
commit61ea5328f76d9ecec163fedbae7e22e60a7ef37b (patch)
tree7fa8ec9ca899db1cf7fc355234fbf02dad40f530 /Source/Core
parentfc3c83eb7bd7528e88c063dd40c44c7af25ddce4 (diff)
parent5e50c37c138e28821079c165b0cd72702ff9154f (diff)
Merge pull request #3774 from phire/Fix_Metroid_Other_M
Fix Metroid: Other M
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/CoreTiming.cpp2
-rw-r--r--Source/Core/Core/CoreTiming.h2
-rw-r--r--Source/Core/Core/HW/AudioInterface.cpp3
-rw-r--r--Source/Core/Core/HW/AudioInterface.h2
-rw-r--r--Source/Core/Core/HW/DSP.cpp6
-rw-r--r--Source/Core/Core/HW/DVDInterface.cpp12
-rw-r--r--Source/Core/Core/HW/DVDThread.cpp4
-rw-r--r--Source/Core/Core/HW/EXI.cpp8
-rw-r--r--Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp4
-rw-r--r--Source/Core/Core/HW/EXI_DeviceMemoryCard.h4
-rw-r--r--Source/Core/Core/HW/ProcessorInterface.cpp4
-rw-r--r--Source/Core/Core/HW/SI.cpp12
-rw-r--r--Source/Core/Core/HW/SI.h1
-rw-r--r--Source/Core/Core/HW/SystemTimers.cpp16
-rw-r--r--Source/Core/Core/HW/WII_IPC.cpp3
-rw-r--r--Source/Core/Core/HW/WII_IPC.h1
-rw-r--r--Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp2
-rw-r--r--Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_DI.cpp2
-rw-r--r--Source/Core/VideoCommon/CommandProcessor.cpp2
-rw-r--r--Source/Core/VideoCommon/Fifo.cpp2
-rw-r--r--Source/Core/VideoCommon/PixelEngine.cpp20
21 files changed, 56 insertions, 56 deletions
diff --git a/Source/Core/Core/CoreTiming.cpp b/Source/Core/Core/CoreTiming.cpp
index c2fb7918b8..c9a3fd4021 100644
--- a/Source/Core/Core/CoreTiming.cpp
+++ b/Source/Core/Core/CoreTiming.cpp
@@ -84,7 +84,7 @@ static void FreeEvent(Event* ev)
eventPool = ev;
}
-static void EmptyTimedCallback(u64 userdata, int cyclesLate) {}
+static void EmptyTimedCallback(u64 userdata, s64 cyclesLate) {}
// Changing the CPU speed in Dolphin isn't actually done by changing the physical clock rate,
// but by changing the amount of work done in a particular amount of time. This tends to be more
diff --git a/Source/Core/Core/CoreTiming.h b/Source/Core/Core/CoreTiming.h
index ab369bc2b3..9be212a7df 100644
--- a/Source/Core/Core/CoreTiming.h
+++ b/Source/Core/Core/CoreTiming.h
@@ -35,7 +35,7 @@ extern float g_lastOCFactor_inverted;
void Init();
void Shutdown();
-typedef void (*TimedCallback)(u64 userdata, int cyclesLate);
+typedef void (*TimedCallback)(u64 userdata, s64 cyclesLate);
// This should only be called from the CPU thread, if you are calling it any other thread, you are doing something evil
u64 GetTicks();
diff --git a/Source/Core/Core/HW/AudioInterface.cpp b/Source/Core/Core/HW/AudioInterface.cpp
index faecfdeb73..f88ebd0326 100644
--- a/Source/Core/Core/HW/AudioInterface.cpp
+++ b/Source/Core/Core/HW/AudioInterface.cpp
@@ -133,6 +133,7 @@ static void UpdateInterrupts();
static void IncreaseSampleCount(const u32 _uAmount);
static int GetAIPeriod();
static int et_AI;
+static void Update(u64 userdata, s64 cyclesLate);
void Init()
{
@@ -299,7 +300,7 @@ unsigned int GetAIDSampleRate()
return g_AIDSampleRate;
}
-void Update(u64 userdata, int cyclesLate)
+static void Update(u64 userdata, s64 cyclesLate)
{
if (m_Control.PSTAT)
{
diff --git a/Source/Core/Core/HW/AudioInterface.h b/Source/Core/Core/HW/AudioInterface.h
index ce7026599a..fde7a7ffae 100644
--- a/Source/Core/Core/HW/AudioInterface.h
+++ b/Source/Core/Core/HW/AudioInterface.h
@@ -21,8 +21,6 @@ bool IsPlaying();
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
-void Update(u64 userdata, int cyclesLate);
-
// Get the audio rates (48000 or 32000 only)
unsigned int GetAIDSampleRate();
diff --git a/Source/Core/Core/HW/DSP.cpp b/Source/Core/Core/HW/DSP.cpp
index a7b3641e81..11ffb5d97b 100644
--- a/Source/Core/Core/HW/DSP.cpp
+++ b/Source/Core/Core/HW/DSP.cpp
@@ -196,12 +196,12 @@ void DoState(PointerWrap &p)
static void UpdateInterrupts();
static void Do_ARAM_DMA();
-static void GenerateDSPInterrupt(u64 DSPIntType, int cyclesLate = 0);
+static void GenerateDSPInterrupt(u64 DSPIntType, s64 cyclesLate = 0);
static int et_GenerateDSPInterrupt;
static int et_CompleteARAM;
-static void CompleteARAM(u64 userdata, int cyclesLate)
+static void CompleteARAM(u64 userdata, s64 cyclesLate)
{
g_dspState.DMAState = 0;
GenerateDSPInterrupt(INT_ARAM);
@@ -467,7 +467,7 @@ static void UpdateInterrupts()
ProcessorInterface::SetInterrupt(ProcessorInterface::INT_CAUSE_DSP, ints_set);
}
-static void GenerateDSPInterrupt(u64 DSPIntType, int cyclesLate)
+static void GenerateDSPInterrupt(u64 DSPIntType, s64 cyclesLate)
{
// The INT_* enumeration members have values that reflect their bit positions in
// DSP_CONTROL - we mask by (INT_DSP | INT_ARAM | INT_AID) just to ensure people
diff --git a/Source/Core/Core/HW/DVDInterface.cpp b/Source/Core/Core/HW/DVDInterface.cpp
index 662fc941ec..5d41e33d15 100644
--- a/Source/Core/Core/HW/DVDInterface.cpp
+++ b/Source/Core/Core/HW/DVDInterface.cpp
@@ -256,8 +256,8 @@ static unsigned char s_media_buffer[0x40];
static int s_eject_disc;
static int s_insert_disc;
-void EjectDiscCallback(u64 userdata, int cyclesLate);
-void InsertDiscCallback(u64 userdata, int cyclesLate);
+static void EjectDiscCallback(u64 userdata, s64 cyclesLate);
+static void InsertDiscCallback(u64 userdata, s64 cyclesLate);
void SetLidOpen(bool _bOpen);
@@ -301,7 +301,7 @@ void DoState(PointerWrap &p)
DVDThread::DoState(p);
}
-static void FinishExecuteCommand(u64 userdata, int cyclesLate)
+static void FinishExecuteCommand(u64 userdata, s64 cyclesLate)
{
if (s_DICR.TSTART)
{
@@ -354,7 +354,7 @@ static u32 ProcessDTKSamples(short *tempPCM, u32 num_samples)
return samples_processed;
}
-static void DTKStreamingCallback(u64 userdata, int cyclesLate)
+static void DTKStreamingCallback(u64 userdata, s64 cyclesLate)
{
// Send audio to the mixer.
static const int NUM_SAMPLES = 48000 / 2000 * 7; // 3.5ms of 48kHz samples
@@ -461,14 +461,14 @@ bool IsDiscInside()
// We want this in the "backend", NOT the gui
// any !empty string will be deleted to ensure
// that the userdata string exists when called
-void EjectDiscCallback(u64 userdata, int cyclesLate)
+static void EjectDiscCallback(u64 userdata, s64 cyclesLate)
{
DVDThread::WaitUntilIdle();
s_inserted_volume.reset();
SetDiscInside(false);
}
-void InsertDiscCallback(u64 userdata, int cyclesLate)
+static void InsertDiscCallback(u64 userdata, s64 cyclesLate)
{
std::string& SavedFileName = SConfig::GetInstance().m_strFilename;
std::string *_FileName = (std::string *)userdata;
diff --git a/Source/Core/Core/HW/DVDThread.cpp b/Source/Core/Core/HW/DVDThread.cpp
index d1f68205c0..dc3ceeaf02 100644
--- a/Source/Core/Core/HW/DVDThread.cpp
+++ b/Source/Core/Core/HW/DVDThread.cpp
@@ -30,7 +30,7 @@ namespace DVDThread
static void DVDThread();
-static void FinishRead(u64 userdata, int cyclesLate);
+static void FinishRead(u64 userdata, s64 cyclesLate);
static int s_finish_read;
static std::thread s_dvd_thread;
@@ -129,7 +129,7 @@ void StartRead(u64 dvd_offset, u32 output_address, u32 length, bool decrypt,
CoreTiming::ScheduleEvent(ticks_until_completion, s_finish_read);
}
-static void FinishRead(u64 userdata, int cyclesLate)
+static void FinishRead(u64 userdata, s64 cyclesLate)
{
WaitUntilIdle();
diff --git a/Source/Core/Core/HW/EXI.cpp b/Source/Core/Core/HW/EXI.cpp
index 7ec74e894e..0307aaa32c 100644
--- a/Source/Core/Core/HW/EXI.cpp
+++ b/Source/Core/Core/HW/EXI.cpp
@@ -28,8 +28,8 @@ static int updateInterrupts;
static std::array<std::unique_ptr<CEXIChannel>, MAX_EXI_CHANNELS> g_Channels;
-static void ChangeDeviceCallback(u64 userdata, int cyclesLate);
-static void UpdateInterruptsCallback(u64 userdata, int cycles_late);
+static void ChangeDeviceCallback(u64 userdata, s64 cyclesLate);
+static void UpdateInterruptsCallback(u64 userdata, s64 cycles_late);
void Init()
{
@@ -91,7 +91,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
}
}
-static void ChangeDeviceCallback(u64 userdata, int cyclesLate)
+static void ChangeDeviceCallback(u64 userdata, s64 cyclesLate)
{
u8 channel = (u8)(userdata >> 32);
u8 type = (u8)(userdata >> 16);
@@ -139,7 +139,7 @@ void UpdateInterrupts()
ProcessorInterface::SetInterrupt(ProcessorInterface::INT_CAUSE_EXI, causeInt);
}
-static void UpdateInterruptsCallback(u64 userdata, int cycles_late)
+static void UpdateInterruptsCallback(u64 userdata, s64 cycles_late)
{
UpdateInterrupts();
}
diff --git a/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp b/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp
index beeb4111f2..1cfdb7e210 100644
--- a/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp
+++ b/Source/Core/Core/HW/EXI_DeviceMemoryCard.cpp
@@ -58,7 +58,7 @@ void CEXIMemoryCard::EventCompleteFindInstance(u64 userdata, std::function<void(
}
}
-void CEXIMemoryCard::CmdDoneCallback(u64 userdata, int cyclesLate)
+void CEXIMemoryCard::CmdDoneCallback(u64 userdata, s64 cyclesLate)
{
EventCompleteFindInstance(userdata, [](CEXIMemoryCard* instance)
{
@@ -66,7 +66,7 @@ void CEXIMemoryCard::CmdDoneCallback(u64 userdata, int cyclesLate)
});
}
-void CEXIMemoryCard::TransferCompleteCallback(u64 userdata, int cyclesLate)
+void CEXIMemoryCard::TransferCompleteCallback(u64 userdata, s64 cyclesLate)
{
EventCompleteFindInstance(userdata, [](CEXIMemoryCard* instance)
{
diff --git a/Source/Core/Core/HW/EXI_DeviceMemoryCard.h b/Source/Core/Core/HW/EXI_DeviceMemoryCard.h
index 2c1d0e08ca..87f75f7975 100644
--- a/Source/Core/Core/HW/EXI_DeviceMemoryCard.h
+++ b/Source/Core/Core/HW/EXI_DeviceMemoryCard.h
@@ -32,10 +32,10 @@ private:
static void EventCompleteFindInstance(u64 userdata, std::function<void(CEXIMemoryCard*)> callback);
// Scheduled when a command that required delayed end signaling is done.
- static void CmdDoneCallback(u64 userdata, int cyclesLate);
+ static void CmdDoneCallback(u64 userdata, s64 cyclesLate);
// Scheduled when memory card is done transferring data
- static void TransferCompleteCallback(u64 userdata, int cyclesLate);
+ static void TransferCompleteCallback(u64 userdata, s64 cyclesLate);
// Signals that the command that was previously executed is now done.
void CmdDone();
diff --git a/Source/Core/Core/HW/ProcessorInterface.cpp b/Source/Core/Core/HW/ProcessorInterface.cpp
index 25ff283608..601d53c77e 100644
--- a/Source/Core/Core/HW/ProcessorInterface.cpp
+++ b/Source/Core/Core/HW/ProcessorInterface.cpp
@@ -31,7 +31,7 @@ static u32 m_Unknown;
// ID and callback for scheduling reset button presses/releases
static int toggleResetButton;
-void ToggleResetButtonCallback(u64 userdata, int cyclesLate);
+static void ToggleResetButtonCallback(u64 userdata, s64 cyclesLate);
// Let the PPC know that an external exception is set/cleared
void UpdateException();
@@ -196,7 +196,7 @@ static void SetResetButton(bool _bSet)
SetInterrupt(INT_CAUSE_RST_BUTTON, !_bSet);
}
-void ToggleResetButtonCallback(u64 userdata, int cyclesLate)
+static void ToggleResetButtonCallback(u64 userdata, s64 cyclesLate)
{
SetResetButton(!!userdata);
}
diff --git a/Source/Core/Core/HW/SI.cpp b/Source/Core/Core/HW/SI.cpp
index 1bbc33c771..db5c6212c3 100644
--- a/Source/Core/Core/HW/SI.cpp
+++ b/Source/Core/Core/HW/SI.cpp
@@ -26,8 +26,8 @@ namespace SerialInterface
static int changeDevice;
static int et_transfer_pending;
-void RunSIBuffer(u64 userdata, int cyclesLate);
-void UpdateInterrupts();
+static void RunSIBuffer(u64 userdata, s64 cyclesLate);
+static void UpdateInterrupts();
// SI Interrupt Types
enum SIInterruptType
@@ -250,6 +250,8 @@ void DoState(PointerWrap &p)
p.Do(g_SIBuffer);
}
+static void ChangeDeviceCallback(u64 userdata, s64 cyclesLate);
+static void RunSIBuffer(u64 userdata, s64 cyclesLate);
void Init()
{
@@ -430,7 +432,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
);
}
-void UpdateInterrupts()
+static void UpdateInterrupts()
{
// check if we have to update the RDSTINT flag
if (g_StatusReg.RDST0 || g_StatusReg.RDST1 ||
@@ -496,7 +498,7 @@ static void SetNoResponse(u32 channel)
g_ComCSR.COMERR = 1;
}
-void ChangeDeviceCallback(u64 userdata, int cyclesLate)
+static void ChangeDeviceCallback(u64 userdata, s64 cyclesLate)
{
u8 channel = (u8)(userdata >> 32);
SIDevices device = (SIDevices)(u32)userdata;
@@ -559,7 +561,7 @@ SIDevices GetDeviceType(int channel)
return g_Channel[channel].m_device->GetDeviceType();
}
-void RunSIBuffer(u64 userdata, int cyclesLate)
+static void RunSIBuffer(u64 userdata, s64 cyclesLate)
{
if (g_ComCSR.TSTART)
{
diff --git a/Source/Core/Core/HW/SI.h b/Source/Core/Core/HW/SI.h
index f01e7b8fa3..e7d2273ef9 100644
--- a/Source/Core/Core/HW/SI.h
+++ b/Source/Core/Core/HW/SI.h
@@ -33,7 +33,6 @@ void RemoveDevice(int _iDeviceNumber);
void AddDevice(const SIDevices _device, int _iDeviceNumber);
void AddDevice(std::unique_ptr<ISIDevice> device);
-void ChangeDeviceCallback(u64 userdata, int cyclesLate);
void ChangeDevice(SIDevices device, int channel);
void ChangeDeviceDeterministic(SIDevices device, int channel);
diff --git a/Source/Core/Core/HW/SystemTimers.cpp b/Source/Core/Core/HW/SystemTimers.cpp
index e900e33762..7ea8eaed0e 100644
--- a/Source/Core/Core/HW/SystemTimers.cpp
+++ b/Source/Core/Core/HW/SystemTimers.cpp
@@ -91,22 +91,22 @@ u32 GetTicksPerSecond()
}
// DSP/CPU timeslicing.
-static void DSPCallback(u64 userdata, int cyclesLate)
+static void DSPCallback(u64 userdata, s64 cyclesLate)
{
//splits up the cycle budget in case lle is used
//for hle, just gives all of the slice to hle
- DSP::UpdateDSPSlice(DSP::GetDSPEmulator()->DSP_UpdateRate() - cyclesLate);
+ DSP::UpdateDSPSlice(static_cast<int>(DSP::GetDSPEmulator()->DSP_UpdateRate() - cyclesLate));
CoreTiming::ScheduleEvent(DSP::GetDSPEmulator()->DSP_UpdateRate() - cyclesLate, et_DSP);
}
-static void AudioDMACallback(u64 userdata, int cyclesLate)
+static void AudioDMACallback(u64 userdata, s64 cyclesLate)
{
int period = s_cpu_core_clock / (AudioInterface::GetAIDSampleRate() * 4 / 32);
DSP::UpdateAudioDMA(); // Push audio to speakers.
CoreTiming::ScheduleEvent(period - cyclesLate, et_AudioDMA);
}
-static void IPC_HLE_UpdateCallback(u64 userdata, int cyclesLate)
+static void IPC_HLE_UpdateCallback(u64 userdata, s64 cyclesLate)
{
if (SConfig::GetInstance().bWii)
{
@@ -115,13 +115,13 @@ static void IPC_HLE_UpdateCallback(u64 userdata, int cyclesLate)
}
}
-static void VICallback(u64 userdata, int cyclesLate)
+static void VICallback(u64 userdata, s64 cyclesLate)
{
VideoInterface::Update();
CoreTiming::ScheduleEvent(VideoInterface::GetTicksPerHalfLine() - cyclesLate, et_VI);
}
-static void DecrementerCallback(u64 userdata, int cyclesLate)
+static void DecrementerCallback(u64 userdata, s64 cyclesLate)
{
PowerPC::ppcState.spr[SPR_DEC] = 0xFFFFFFFF;
PowerPC::ppcState.Exceptions |= EXCEPTION_DECREMENTER;
@@ -157,14 +157,14 @@ u64 GetFakeTimeBase()
return CoreTiming::GetFakeTBStartValue() + ((CoreTiming::GetTicks() - CoreTiming::GetFakeTBStartTicks()) / TIMER_RATIO);
}
-static void PatchEngineCallback(u64 userdata, int cyclesLate)
+static void PatchEngineCallback(u64 userdata, s64 cyclesLate)
{
// Patch mem and run the Action Replay
PatchEngine::ApplyFramePatches();
CoreTiming::ScheduleEvent(VideoInterface::GetTicksPerField() - cyclesLate, et_PatchEngine);
}
-static void ThrottleCallback(u64 last_time, int cyclesLate)
+static void ThrottleCallback(u64 last_time, s64 cyclesLate)
{
// Allow the GPU thread to sleep. Setting this flag here limits the wakeups to 1 kHz.
Fifo::GpuMaySleep();
diff --git a/Source/Core/Core/HW/WII_IPC.cpp b/Source/Core/Core/HW/WII_IPC.cpp
index 2f3f1e54ea..e24e597837 100644
--- a/Source/Core/Core/HW/WII_IPC.cpp
+++ b/Source/Core/Core/HW/WII_IPC.cpp
@@ -98,6 +98,7 @@ static u32 arm_irq_masks;
static u32 sensorbar_power; // do we need to care about this?
static int updateInterrupts;
+static void UpdateInterrupts(u64 = 0, s64 cyclesLate = 0);
void DoState(PointerWrap &p)
{
@@ -200,7 +201,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
mmio->Register(base | UNK_1D0, MMIO::Constant<u32>(0), MMIO::Nop<u32>());
}
-void UpdateInterrupts(u64 userdata, int cyclesLate)
+static void UpdateInterrupts(u64 userdata, s64 cyclesLate)
{
if ((ctrl.Y1 & ctrl.IY1) || (ctrl.Y2 & ctrl.IY2))
{
diff --git a/Source/Core/Core/HW/WII_IPC.h b/Source/Core/Core/HW/WII_IPC.h
index 463ee8960c..420faa69c3 100644
--- a/Source/Core/Core/HW/WII_IPC.h
+++ b/Source/Core/Core/HW/WII_IPC.h
@@ -40,7 +40,6 @@ void DoState(PointerWrap &p);
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
-void UpdateInterrupts(u64 userdata = 0, int cyclesLate = 0);
void GenerateAck(u32 _Address);
void GenerateReply(u32 _Address);
diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp
index 89bedf79b4..7e1c5b6253 100644
--- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp
+++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE.cpp
@@ -83,7 +83,7 @@ static u64 last_reply_time;
static const u64 ENQUEUE_REQUEST_FLAG = 0x100000000ULL;
static const u64 ENQUEUE_ACKNOWLEDGEMENT_FLAG = 0x200000000ULL;
-static void EnqueueEvent(u64 userdata, int cycles_late = 0)
+static void EnqueueEvent(u64 userdata, s64 cycles_late = 0)
{
if (userdata & ENQUEUE_ACKNOWLEDGEMENT_FLAG)
{
diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_DI.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_DI.cpp
index d6e6f59427..f039164c31 100644
--- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_DI.cpp
+++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_DI.cpp
@@ -18,7 +18,7 @@
static int ioctl_callback;
-static void IOCtlCallback(u64 userdata, int cycles_late)
+static void IOCtlCallback(u64 userdata, s64 cycles_late)
{
std::shared_ptr<IWII_IPC_HLE_Device> di = WII_IPC_HLE_Interface::GetDeviceByName("/dev/di");
if (di)
diff --git a/Source/Core/VideoCommon/CommandProcessor.cpp b/Source/Core/VideoCommon/CommandProcessor.cpp
index 92bb3c715d..a480cc90dc 100644
--- a/Source/Core/VideoCommon/CommandProcessor.cpp
+++ b/Source/Core/VideoCommon/CommandProcessor.cpp
@@ -47,7 +47,7 @@ static bool IsOnThread()
return SConfig::GetInstance().bCPUThread;
}
-static void UpdateInterrupts_Wrapper(u64 userdata, int cyclesLate)
+static void UpdateInterrupts_Wrapper(u64 userdata, s64 cyclesLate)
{
UpdateInterrupts(userdata);
}
diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp
index 9e383b84d4..662e0cdd7b 100644
--- a/Source/Core/VideoCommon/Fifo.cpp
+++ b/Source/Core/VideoCommon/Fifo.cpp
@@ -548,7 +548,7 @@ static int Update(int ticks)
return param.iSyncGpuMaxDistance - s_sync_ticks.load();
}
-static void SyncGPUCallback(u64 userdata, int cyclesLate)
+static void SyncGPUCallback(u64 userdata, s64 cyclesLate)
{
u64 now = CoreTiming::GetTicks();
int next = Fifo::Update((int)(now - s_last_sync_gpu_tick));
diff --git a/Source/Core/VideoCommon/PixelEngine.cpp b/Source/Core/VideoCommon/PixelEngine.cpp
index 9b61ecee4c..50620e22e3 100644
--- a/Source/Core/VideoCommon/PixelEngine.cpp
+++ b/Source/Core/VideoCommon/PixelEngine.cpp
@@ -124,11 +124,11 @@ void DoState(PointerWrap &p)
p.Do(s_signal_finish_interrupt);
}
-void UpdateInterrupts();
-void UpdateTokenInterrupt(bool active);
-void UpdateFinishInterrupt(bool active);
-void SetToken_OnMainThread(u64 userdata, int cyclesLate);
-void SetFinish_OnMainThread(u64 userdata, int cyclesLate);
+static void UpdateInterrupts();
+static void UpdateTokenInterrupt(bool active);
+static void UpdateFinishInterrupt(bool active);
+static void SetToken_OnMainThread(u64 userdata, s64 cyclesLate);
+static void SetFinish_OnMainThread(u64 userdata, s64 cyclesLate);
void Init()
{
@@ -237,7 +237,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
}
}
-void UpdateInterrupts()
+static void UpdateInterrupts()
{
// check if there is a token-interrupt
UpdateTokenInterrupt((s_signal_token_interrupt.load() & m_Control.PETokenEnable) != 0);
@@ -246,12 +246,12 @@ void UpdateInterrupts()
UpdateFinishInterrupt((s_signal_finish_interrupt.load() & m_Control.PEFinishEnable) != 0);
}
-void UpdateTokenInterrupt(bool active)
+static void UpdateTokenInterrupt(bool active)
{
ProcessorInterface::SetInterrupt(INT_CAUSE_PE_TOKEN, active);
}
-void UpdateFinishInterrupt(bool active)
+static void UpdateFinishInterrupt(bool active)
{
ProcessorInterface::SetInterrupt(INT_CAUSE_PE_FINISH, active);
}
@@ -261,7 +261,7 @@ void UpdateFinishInterrupt(bool active)
// Cleanup++
// Called only if BPMEM_PE_TOKEN_INT_ID is ack by GP
-void SetToken_OnMainThread(u64 userdata, int cyclesLate)
+static void SetToken_OnMainThread(u64 userdata, s64 cyclesLate)
{
// XXX: No 16-bit atomic store available, so cheat and use 32-bit.
// That's what we've always done. We're counting on fifo.PEToken to be
@@ -276,7 +276,7 @@ void SetToken_OnMainThread(u64 userdata, int cyclesLate)
CommandProcessor::SetInterruptTokenWaiting(false);
}
-void SetFinish_OnMainThread(u64 userdata, int cyclesLate)
+static void SetFinish_OnMainThread(u64 userdata, s64 cyclesLate)
{
s_signal_finish_interrupt.store(1);
UpdateInterrupts();