mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
many warning fixes
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@422 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -126,47 +126,47 @@ void Video_SendFifoData(u8* _uData)
|
||||
// See Core.cpp for threading idea
|
||||
void Fifo_EnterLoop(const SVideoInitialize &video_initialize)
|
||||
{
|
||||
SCPFifoStruct &fifo = *video_initialize.pCPFifo;
|
||||
SCPFifoStruct &_fifo = *video_initialize.pCPFifo;
|
||||
|
||||
// TODO(ector): Don't peek so often!
|
||||
while (video_initialize.pPeekMessages())
|
||||
{
|
||||
if (fifo.CPReadWriteDistance < 1) //fifo.CPLoWatermark)
|
||||
if (_fifo.CPReadWriteDistance < 1) //fifo.CPLoWatermark)
|
||||
Common::SleepCurrentThread(1);
|
||||
//etc...
|
||||
|
||||
// check if we are able to run this buffer
|
||||
if ((fifo.bFF_GPReadEnable) && !(fifo.bFF_BPEnable && fifo.bFF_Breakpoint))
|
||||
if ((_fifo.bFF_GPReadEnable) && !(_fifo.bFF_BPEnable && _fifo.bFF_Breakpoint))
|
||||
{
|
||||
int count = 200;
|
||||
while(fifo.CPReadWriteDistance > 0 && count)
|
||||
while(_fifo.CPReadWriteDistance > 0 && count)
|
||||
{
|
||||
// check if we are on a breakpoint
|
||||
if (fifo.bFF_BPEnable)
|
||||
if (_fifo.bFF_BPEnable)
|
||||
{
|
||||
if (fifo.CPReadPointer == fifo.CPBreakpoint)
|
||||
if (_fifo.CPReadPointer == _fifo.CPBreakpoint)
|
||||
{
|
||||
fifo.bFF_Breakpoint = 1;
|
||||
_fifo.bFF_Breakpoint = 1;
|
||||
video_initialize.pUpdateInterrupts();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// read the data and send it to the VideoPlugin
|
||||
u8 *uData = video_initialize.pGetMemoryPointer(fifo.CPReadPointer);
|
||||
u8 *uData = video_initialize.pGetMemoryPointer(_fifo.CPReadPointer);
|
||||
#ifdef _WIN32
|
||||
EnterCriticalSection(&fifo.sync);
|
||||
#endif
|
||||
fifo.CPReadPointer += 32;
|
||||
_fifo.CPReadPointer += 32;
|
||||
Video_SendFifoData(uData);
|
||||
#ifdef _WIN32
|
||||
InterlockedExchangeAdd((LONG*)&fifo.CPReadWriteDistance, -32);
|
||||
InterlockedExchangeAdd((LONG*)&_fifo.CPReadWriteDistance, -32);
|
||||
LeaveCriticalSection(&fifo.sync);
|
||||
#endif
|
||||
// increase the ReadPtr
|
||||
if (fifo.CPReadPointer >= fifo.CPEnd)
|
||||
if (_fifo.CPReadPointer >= _fifo.CPEnd)
|
||||
{
|
||||
fifo.CPReadPointer = fifo.CPBase;
|
||||
_fifo.CPReadPointer = _fifo.CPBase;
|
||||
//LOG(COMMANDPROCESSOR, "BUFFER LOOP");
|
||||
}
|
||||
count--;
|
||||
|
@ -247,15 +247,15 @@ void DVProfWrite(const char* pfilename, u32 frames)
|
||||
}
|
||||
|
||||
{
|
||||
map<string, DVTIMEINFO>::iterator it;
|
||||
map<string, DVTIMEINFO>::iterator iter;
|
||||
fprintf(f, "\n\n-------------------------------------------------------------------\n\n");
|
||||
|
||||
u64 uTotal[2] = {0};
|
||||
double fiTotalTime[2];
|
||||
|
||||
for(it = mapAggregateTimes.begin(); it != mapAggregateTimes.end(); ++it) {
|
||||
uTotal[0] += it->second.uExclusive;
|
||||
uTotal[1] += it->second.uInclusive;
|
||||
for(iter = mapAggregateTimes.begin(); iter != mapAggregateTimes.end(); ++iter) {
|
||||
uTotal[0] += iter->second.uExclusive;
|
||||
uTotal[1] += iter->second.uInclusive;
|
||||
}
|
||||
|
||||
fprintf(f, "total times (%d): ex: %Lu ", frames, 1000000*uTotal[0]/(luPerfFreq*(u64)frames));
|
||||
@ -265,9 +265,9 @@ void DVProfWrite(const char* pfilename, u32 frames)
|
||||
fiTotalTime[1] = 1.0 / (double)uTotal[1];
|
||||
|
||||
// output the combined times
|
||||
for(it = mapAggregateTimes.begin(); it != mapAggregateTimes.end(); ++it) {
|
||||
fprintf(f, "%s - ex: %f inc: %f\n", it->first.c_str(), (float)((double)it->second.uExclusive * fiTotalTime[0]),
|
||||
(float)((double)it->second.uInclusive * fiTotalTime[1]));
|
||||
for(iter = mapAggregateTimes.begin(); iter != mapAggregateTimes.end(); ++iter) {
|
||||
fprintf(f, "%s - ex: %f inc: %f\n", iter->first.c_str(), (float)((double)iter->second.uExclusive * fiTotalTime[0]),
|
||||
(float)((double)iter->second.uInclusive * fiTotalTime[1]));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ class DVProfileFunc
|
||||
public:
|
||||
u32 dwUserData;
|
||||
__forceinline DVProfileFunc(const char* pname) {}
|
||||
__forceinline DVProfileFunc(const char* pname, u32 dwUserData) { }
|
||||
__forceinline DVProfileFunc(const char* pname, u32 _dwUserData) { }
|
||||
~DVProfileFunc() {}
|
||||
};
|
||||
|
||||
|
@ -480,7 +480,7 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in
|
||||
while(*fmt)
|
||||
{
|
||||
int xcnt = 0;
|
||||
int nchar = sfont_map[*fmt];
|
||||
int nchar = sfont_map[(int)*fmt];
|
||||
|
||||
const unsigned char *ptr = sfont_raw[nchar]; // each char is up to 9x10
|
||||
|
||||
|
Reference in New Issue
Block a user