Linux: Tons of warning cleanup plus workaround a nasty crash problem in StatusBarMessage.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4234 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2009-09-08 21:16:05 +00:00
parent e3d505c631
commit 0a576c7508
29 changed files with 107 additions and 110 deletions

View File

@ -25,6 +25,7 @@ warnings = [
'pointer-arith', 'pointer-arith',
'packed', 'packed',
'no-conversion', 'no-conversion',
# 'no-unused-result', (need a newer gcc for this?)
] ]
compileFlags = [ compileFlags = [
'-fno-exceptions', '-fno-exceptions',
@ -175,7 +176,7 @@ if not env['verbose']:
env['SHLINKCOMSTR'] = "Linking shared $TARGET" env['SHLINKCOMSTR'] = "Linking shared $TARGET"
env['RANLIBCOMSTR'] = "Indexing $TARGET" env['RANLIBCOMSTR'] = "Indexing $TARGET"
# build falvuor # build flavor
flavour = ARGUMENTS.get('flavor') flavour = ARGUMENTS.get('flavor')
if (flavour == 'debug'): if (flavour == 'debug'):
compileFlags.append('-g') compileFlags.append('-g')
@ -200,7 +201,7 @@ if env['lint']:
warnings.append('float-equal') warnings.append('float-equal')
# add the warnings to the compile flags # add the warnings to the compile flags
compileFlags += [ '-W' + warning for warning in warnings ] compileFlags += [ ('-W' + warning) for warning in warnings ]
env['CCFLAGS'] = compileFlags env['CCFLAGS'] = compileFlags
if sys.platform == 'win32': if sys.platform == 'win32':

View File

@ -91,20 +91,18 @@ u32 CWII_IPC_HLE_Device_usb_kbd::Update()
u8 Modifiers = 0x00; u8 Modifiers = 0x00;
u8 PressedKeys[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; u8 PressedKeys[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
bool GotEvent = false; bool GotEvent = false;
int i, j; int num_pressed_keys = 0;
for (int i = 0; i < 256; i++)
j = 0;
for (i = 0; i < 256; i++)
{ {
bool KeyPressedNow = IsKeyPressed(i); bool KeyPressedNow = IsKeyPressed(i);
bool KeyPressedBefore = m_OldKeyBuffer[i]; bool KeyPressedBefore = m_OldKeyBuffer[i];
u8 KeyCode; u8 KeyCode = 0;
if (KeyPressedNow ^ KeyPressedBefore) if (KeyPressedNow ^ KeyPressedBefore)
{ {
if (KeyPressedNow) if (KeyPressedNow)
{ {
switch(m_KeyboardLayout) switch (m_KeyboardLayout)
{ {
case KBD_LAYOUT_QWERTY: case KBD_LAYOUT_QWERTY:
KeyCode = m_KeyCodesQWERTY[i]; KeyCode = m_KeyCodesQWERTY[i];
@ -115,13 +113,14 @@ u32 CWII_IPC_HLE_Device_usb_kbd::Update()
break; break;
} }
if(KeyCode == 0x00) if (KeyCode == 0x00)
continue; continue;
PressedKeys[j] = KeyCode; PressedKeys[num_pressed_keys] = KeyCode;
j++; num_pressed_keys++;
if(j == 6) break; if (num_pressed_keys == 6)
break;
} }
GotEvent = true; GotEvent = true;
@ -151,7 +150,7 @@ u32 CWII_IPC_HLE_Device_usb_kbd::Update()
// TODO: modifiers for non-Windows platforms // TODO: modifiers for non-Windows platforms
#endif #endif
if(Modifiers ^ m_OldModifiers) if (Modifiers ^ m_OldModifiers)
{ {
GotEvent = true; GotEvent = true;
m_OldModifiers = Modifiers; m_OldModifiers = Modifiers;

View File

@ -228,11 +228,10 @@ void EndRecordingInput()
// TODO // TODO
header.uniqueID = 0; header.uniqueID = 0;
header.numRerecords = 0; header.numRerecords = 0;
header.author; // header.author;
header.videoPlugin; // header.videoPlugin;
header.audioPlugin; // header.audioPlugin;
header.padPlugin; // header.padPlugin;
fwrite(&header, sizeof(DTMHeader), 1, g_recordfd); fwrite(&header, sizeof(DTMHeader), 1, g_recordfd);

View File

@ -47,9 +47,6 @@
// Create the plugin manager class // Create the plugin manager class
CPluginManager CPluginManager::m_Instance; CPluginManager CPluginManager::m_Instance;
// The Plugin Manager Class // The Plugin Manager Class
// ------------ // ------------

View File

@ -433,7 +433,7 @@ void STACKALIGN Jit64::Jit(u32 em_address)
} }
const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buffer, JitBlock *b) const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBlock *b)
{ {
if (em_address == 0) if (em_address == 0)
PanicAlert("ERROR : Trying to compile at 0. LR=%08x", LR); PanicAlert("ERROR : Trying to compile at 0. LR=%08x", LR);
@ -449,8 +449,8 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buffer, JitB
//Analyze the block, collect all instructions it is made of (including inlining, //Analyze the block, collect all instructions it is made of (including inlining,
//if that is enabled), reorder instructions for optimal performance, and join joinable instructions. //if that is enabled), reorder instructions for optimal performance, and join joinable instructions.
PPCAnalyst::Flatten(em_address, &size, &js.st, &js.gpa, &js.fpa, code_buffer); PPCAnalyst::Flatten(em_address, &size, &js.st, &js.gpa, &js.fpa, code_buf);
PPCAnalyst::CodeOp *ops = code_buffer->codebuffer; PPCAnalyst::CodeOp *ops = code_buf->codebuffer;
const u8 *start = AlignCode4(); //TODO: Test if this or AlignCode16 make a difference from GetCodePtr const u8 *start = AlignCode4(); //TODO: Test if this or AlignCode16 make a difference from GetCodePtr
b->checkedEntry = start; b->checkedEntry = start;

View File

@ -136,7 +136,6 @@
int a = inst.RA; int a = inst.RA;
int b = inst.RB; int b = inst.RB;
int crf = inst.CRFD; int crf = inst.CRFD;
int shift = crf * 4;
bool merge_branch = false; bool merge_branch = false;
int test_crf = js.next_inst.BI >> 2; int test_crf = js.next_inst.BI >> 2;

View File

@ -315,7 +315,7 @@ void LoadStateCallback(u64 userdata, int cyclesLate)
buffer = new u8[sz]; buffer = new u8[sz];
int x; int x;
if ((x = (int)fread(buffer, 1, sz, f)) != sz) if ((x = (int)fread(buffer, 1, sz, f)) != (int)sz)
PanicAlert("wtf? %d %d", x, sz); PanicAlert("wtf? %d %d", x, sz);
} }

View File

@ -58,7 +58,6 @@ void StopTrace()
} }
static int stateSize = 32*4;// + 32*16 + 6*4; static int stateSize = 32*4;// + 32*16 + 6*4;
static u64 tb;
int SyncTrace() int SyncTrace()
{ {

View File

@ -73,8 +73,7 @@ void AnalyzeRange(int start_addr, int end_addr)
// This may not be 100% accurate in case of jump tables! // This may not be 100% accurate in case of jump tables!
// It could get desynced, which would be bad. We'll see if that's an issue. // It could get desynced, which would be bad. We'll see if that's an issue.
int addr = start_addr; for (int addr = start_addr; addr < end_addr;)
while (addr < end_addr)
{ {
UDSPInstruction inst = dsp_imem_read(addr); UDSPInstruction inst = dsp_imem_read(addr);
const DSPOPCTemplate *opcode = GetOpTemplate(inst); const DSPOPCTemplate *opcode = GetOpTemplate(inst);

View File

@ -79,7 +79,6 @@ DSPDisassembler::~DSPDisassembler()
bool DSPDisassembler::Disassemble(int start_pc, const std::vector<u16> &code, int base_addr, std::string &text) bool DSPDisassembler::Disassemble(int start_pc, const std::vector<u16> &code, int base_addr, std::string &text)
{ {
const char *tmp1 = "tmp1.bin"; const char *tmp1 = "tmp1.bin";
const char *tmp2 = "tmp.txt";
// First we have to dump the code to a bin file. // First we have to dump the code to a bin file.
FILE *f = fopen(tmp1, "wb"); FILE *f = fopen(tmp1, "wb");

View File

@ -220,8 +220,6 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
int src, dst, srcAddr; int src, dst, srcAddr;
}; };
// branch branches[256]; // TODO: This is not being used
int numBranches = 0;
// TODO: Add any drawing code here... // TODO: Add any drawing code here...
int width = rc.width; int width = rc.width;
int numRows = (rc.height / rowHeight) / 2 + 2; int numRows = (rc.height / rowHeight) / 2 + 2;
@ -292,8 +290,8 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
if (debugger->isAlive()) if (debugger->isAlive())
{ {
char dis[256] = {0}; char dis[256] = {0};
u32 mem = debugger->readExtraMemory(memory, address); u32 mem_data = debugger->readExtraMemory(memory, address);
float flt = *(float *)(&mem); float flt = *(float *)(&mem_data);
sprintf(dis, "f: %f", flt); sprintf(dis, "f: %f", flt);
char desc[256] = ""; char desc[256] = "";

View File

@ -154,11 +154,11 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name) wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name)
: wxPanel((wxWindow*)parent, id, position, size, style, name) : wxPanel((wxWindow*)parent, id, position, size, style, name)
, Parent(parent) , Parent(parent)
, codeview(NULL)
, m_RegisterWindow(NULL) , m_RegisterWindow(NULL)
, m_BreakpointWindow(NULL) , m_BreakpointWindow(NULL)
, m_MemoryWindow(NULL) , m_MemoryWindow(NULL)
, m_JitWindow(NULL) , m_JitWindow(NULL)
, codeview(NULL)
{ {
InitBitmaps(); InitBitmaps();
@ -536,7 +536,7 @@ void CCodeWindow::CreateMenuOptions(wxMenuBar * _pMenuBar, wxMenu* _pMenu)
, wxITEM_CHECK); , wxITEM_CHECK);
automaticstart->Check(bAutomaticStart); automaticstart->Check(bAutomaticStart);
wxMenuItem* pFontPicker = _pMenu->Append(IDM_FONTPICKER, _T("&Font..."), wxEmptyString, wxITEM_NORMAL); _pMenu->Append(IDM_FONTPICKER, _T("&Font..."), wxEmptyString, wxITEM_NORMAL);
} }
// CPU Mode and JIT Menu // CPU Mode and JIT Menu

View File

@ -60,10 +60,10 @@ public:
private: private:
u32 m_CachedRegs[32]; u32 m_CachedRegs[32];
u32 m_CachedSpecialRegs[6]; u32 m_CachedSpecialRegs[NUM_SPECIALS];
double m_CachedFRegs[32][2]; double m_CachedFRegs[32][2];
bool m_CachedRegHasChanged[32]; bool m_CachedRegHasChanged[32];
bool m_CachedSpecialRegHasChanged[6]; bool m_CachedSpecialRegHasChanged[NUM_SPECIALS];
bool m_CachedFRegHasChanged[32][2]; bool m_CachedFRegHasChanged[32][2];
DECLARE_NO_COPY_CLASS(CRegTable); DECLARE_NO_COPY_CLASS(CRegTable);

View File

@ -112,7 +112,7 @@ CBannerLoaderGC::GetName(std::string _rName[])
{ {
DVDBanner2* pBanner = (DVDBanner2*)m_pBannerFile; DVDBanner2* pBanner = (DVDBanner2*)m_pBannerFile;
u32 languageID = SConfig::GetInstance().m_InterfaceLanguage; // u32 languageID = SConfig::GetInstance().m_InterfaceLanguage;
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
{ {
char tempBuffer[65] = {0}; char tempBuffer[65] = {0};

View File

@ -184,7 +184,7 @@ bool Scrub(const char* filename, CompressCB callback, void* arg)
if (i % (numClusters / 1000) == 0) if (i % (numClusters / 1000) == 0)
{ {
char temp[512]; char temp[512];
sprintf(temp, "DiscScrubber: %lu/%lu (%s)", i, numClusters, m_FreeTable[i] ? "Free" : "Used"); sprintf(temp, "DiscScrubber: %u/%u (%s)", i, numClusters, m_FreeTable[i] ? "Free" : "Used");
callback(temp, (float)i / (float)numClusters, arg); callback(temp, (float)i / (float)numClusters, arg);
} }
} }

View File

@ -119,8 +119,8 @@ namespace DiscIO
bool DriveReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8 *out_ptr) bool DriveReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8 *out_ptr)
{ {
u32 NotUsed;
#ifdef _WIN32 #ifdef _WIN32
u32 NotUsed;
u64 offset = m_blocksize * block_num; u64 offset = m_blocksize * block_num;
LONG off_low = (LONG)offset & 0xFFFFFFFF; LONG off_low = (LONG)offset & 0xFFFFFFFF;
LONG off_high = (LONG)(offset >> 32); LONG off_high = (LONG)(offset >> 32);

View File

@ -630,7 +630,10 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
case IDM_UPDATESTATUSBAR: case IDM_UPDATESTATUSBAR:
if (m_pStatusBar != NULL) if (m_pStatusBar != NULL)
{ {
// Linux doesn't like it since the message isn't coming from the GUI thread. We need to change this to post a message to the Frame.
#ifdef _WIN32
m_pStatusBar->SetStatusText(event.GetString(), event.GetInt()); m_pStatusBar->SetStatusText(event.GetString(), event.GetInt());
#endif
} }
break; break;
} }

View File

@ -78,7 +78,7 @@ class CFrame : public wxFrame
void PostEvent(wxCommandEvent& event); void PostEvent(wxCommandEvent& event);
void PostMenuEvent(wxMenuEvent& event); void PostMenuEvent(wxMenuEvent& event);
void PostUpdateUIEvent(wxUpdateUIEvent& event); void PostUpdateUIEvent(wxUpdateUIEvent& event);
void StatusBarMessage(char * Text, ...); void StatusBarMessage(const char * Text, ...);
void ClearStatusBar(); void ClearStatusBar();
void OnCustomHostMessage(int Id); void OnCustomHostMessage(int Id);

View File

@ -707,7 +707,8 @@ void CFrame::ClearStatusBar()
{ {
if (this->GetStatusBar()->IsEnabled()) this->GetStatusBar()->SetStatusText(wxT(""),0); if (this->GetStatusBar()->IsEnabled()) this->GetStatusBar()->SetStatusText(wxT(""),0);
} }
void CFrame::StatusBarMessage(char * Text, ...)
void CFrame::StatusBarMessage(const char * Text, ...)
{ {
const int MAX_BYTES = 1024*10; const int MAX_BYTES = 1024*10;
char Str[MAX_BYTES]; char Str[MAX_BYTES];

View File

@ -30,10 +30,10 @@ struct ProjectionHack
{ {
} }
ProjectionHack(bool enabled, float value) ProjectionHack(bool new_enabled, float new_value)
{ {
ProjectionHack::enabled = enabled; enabled = new_enabled;
ProjectionHack::value = value; value = new_value;
} }
}; };

View File

@ -21,9 +21,9 @@
#include "VertexLoader_Normal.h" #include "VertexLoader_Normal.h"
#include "NativeVertexWriter.h" #include "NativeVertexWriter.h"
#define LOG_NORM8() PRIM_LOG("norm: %f %f %f, ", ((s8*)VertexManager::s_pCurBufferPointer)[-3]/127.0f, ((s8*)VertexManager::s_pCurBufferPointer)[-2]/127.0f, ((s8*)VertexManager::s_pCurBufferPointer)[-1]/127.0f); #define LOG_NORM8() // PRIM_LOG("norm: %f %f %f, ", ((s8*)VertexManager::s_pCurBufferPointer)[-3]/127.0f, ((s8*)VertexManager::s_pCurBufferPointer)[-2]/127.0f, ((s8*)VertexManager::s_pCurBufferPointer)[-1]/127.0f);
#define LOG_NORM16() PRIM_LOG("norm: %f %f %f, ", ((s16*)VertexManager::s_pCurBufferPointer)[-3]/32767.0f, ((s16*)VertexManager::s_pCurBufferPointer)[-2]/32767.0f, ((s16*)VertexManager::s_pCurBufferPointer)[-1]/32767.0f); #define LOG_NORM16() // PRIM_LOG("norm: %f %f %f, ", ((s16*)VertexManager::s_pCurBufferPointer)[-3]/32767.0f, ((s16*)VertexManager::s_pCurBufferPointer)[-2]/32767.0f, ((s16*)VertexManager::s_pCurBufferPointer)[-1]/32767.0f);
#define LOG_NORMF() PRIM_LOG("norm: %f %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[-3], ((float*)VertexManager::s_pCurBufferPointer)[-2], ((float*)VertexManager::s_pCurBufferPointer)[-1]); #define LOG_NORMF() // PRIM_LOG("norm: %f %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[-3], ((float*)VertexManager::s_pCurBufferPointer)[-2], ((float*)VertexManager::s_pCurBufferPointer)[-1]);
VertexLoader_Normal::Set VertexLoader_Normal::m_Table[NUM_NRM_TYPE][NUM_NRM_INDICES][NUM_NRM_ELEMENTS][NUM_NRM_FORMAT]; VertexLoader_Normal::Set VertexLoader_Normal::m_Table[NUM_NRM_TYPE][NUM_NRM_INDICES][NUM_NRM_ELEMENTS][NUM_NRM_FORMAT];

View File

@ -24,8 +24,8 @@
#include "VertexLoader_Position.h" #include "VertexLoader_Position.h"
#include "NativeVertexWriter.h" #include "NativeVertexWriter.h"
#define LOG_TEX1() PRIM_LOG("tex: %f, ", ((float*)VertexManager::s_pCurBufferPointer)[0]); #define LOG_TEX1() // PRIM_LOG("tex: %f, ", ((float*)VertexManager::s_pCurBufferPointer)[0]);
#define LOG_TEX2() PRIM_LOG("tex: %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[0], ((float*)VertexManager::s_pCurBufferPointer)[1]); #define LOG_TEX2() // PRIM_LOG("tex: %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[0], ((float*)VertexManager::s_pCurBufferPointer)[1]);
extern int tcIndex; extern int tcIndex;
extern float tcScale[8]; extern float tcScale[8];

View File

@ -129,7 +129,9 @@ struct TargetRectangle : public MathUtil::Rectangle<int>
#define PRIM_LOG(...) {DEBUG_LOG(VIDEO, ##__VA_ARGS__)} #define PRIM_LOG(...) {DEBUG_LOG(VIDEO, ##__VA_ARGS__)}
#endif #endif
#define LOG_VTX() DEBUG_LOG(VIDEO, "vtx: %f %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[0], ((float*)VertexManager::s_pCurBufferPointer)[1], ((float*)VertexManager::s_pCurBufferPointer)[2]);
// #define LOG_VTX() DEBUG_LOG(VIDEO, "vtx: %f %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[0], ((float*)VertexManager::s_pCurBufferPointer)[1], ((float*)VertexManager::s_pCurBufferPointer)[2]);
#define LOG_VTX()
#endif // _VIDEOCOMMON_H #endif // _VIDEOCOMMON_H

View File

@ -395,7 +395,7 @@ int main(int argc, const char *argv[])
codes = new std::vector<u16>[lines]; codes = new std::vector<u16>[lines];
for(int i = 0; i < lines; i++) for (int i = 0; i < lines; i++)
{ {
if (!File::ReadFileToString(true, files[i].c_str(), currentSource)) if (!File::ReadFileToString(true, files[i].c_str(), currentSource))
{ {
@ -404,14 +404,15 @@ int main(int argc, const char *argv[])
} }
else else
{ {
if(!Assemble(currentSource.c_str(), codes[i], force)) if (!Assemble(currentSource.c_str(), codes[i], force))
{ {
printf("Assemble: Assembly of %s failed due to errors\n", printf("Assemble: Assembly of %s failed due to errors\n",
files[i].c_str()); files[i].c_str());
lines--; lines--;
} }
if(outputSize) if (outputSize) {
printf("%s: %d\n", files[i].c_str(), codes[i].size()); printf("%s: %d\n", files[i].c_str(), (int)codes[i].size());
}
} }
} }
@ -425,13 +426,14 @@ int main(int argc, const char *argv[])
{ {
std::vector<u16> code; std::vector<u16> code;
if(!Assemble(source.c_str(), code, force)) { if (!Assemble(source.c_str(), code, force)) {
printf("Assemble: Assembly failed due to errors\n"); printf("Assemble: Assembly failed due to errors\n");
return 1; return 1;
} }
if(outputSize) if (outputSize) {
printf("%s: %d\n", input_name.c_str(), code.size()); printf("%s: %d\n", input_name.c_str(), (int)code.size());
}
if (!output_name.empty()) if (!output_name.empty())
{ {

View File

@ -31,68 +31,65 @@
// Externals // Externals
extern u32 m_addressPBs; extern u32 m_addressPBs;
float ratioFactor; static float ratioFactor;
int globaliSize; static u32 gLastBlock;
short globalpBuffer;
u32 gLastBlock;
// Vectors and other things // Vectors and other things
std::vector<u32> gloopPos(64); static std::vector<u32> gloopPos(64);
std::vector<u32> gsampleEnd(64); static std::vector<u32> gsampleEnd(64);
std::vector<u32> gsamplePos(64); static std::vector<u32> gsamplePos(64);
std::vector<u32> gratio(64); static std::vector<u32> gratio(64);
std::vector<u32> gratiohi(64); static std::vector<u32> gratiohi(64);
std::vector<u32> gratiolo(64); static std::vector<u32> gratiolo(64);
std::vector<u32> gfrac(64); static std::vector<u32> gfrac(64);
std::vector<u32> gcoef(64); static std::vector<u32> gcoef(64);
// PBSampleRateConverter mixer // PBSampleRateConverter mixer
std::vector<u16> gvolume_left(64); static std::vector<u16> gvolume_left(64);
std::vector<u16> gvolume_right(64); static std::vector<u16> gvolume_right(64);
std::vector<u16> gmixer_control(64); static std::vector<u16> gmixer_control(64);
std::vector<u16> gcur_volume(64); static std::vector<u16> gcur_volume(64);
std::vector<u16> gcur_volume_delta(64); static std::vector<u16> gcur_volume_delta(64);
std::vector<u16> gaudioFormat(64); static std::vector<u16> gaudioFormat(64);
std::vector<u16> glooping(64); static std::vector<u16> glooping(64);
std::vector<u16> gsrc_type(64); static std::vector<u16> gsrc_type(64);
std::vector<u16> gis_stream(64); static std::vector<u16> gis_stream(64);
// loop // loop
std::vector<u16> gloop1(64); static std::vector<u16> gloop1(64);
std::vector<u16> gloop2(64); static std::vector<u16> gloop2(64);
std::vector<u16> gloop3(64); static std::vector<u16> gloop3(64);
std::vector<u16> gadloop1(64); static std::vector<u16> gadloop1(64);
std::vector<u16> gadloop2(64); static std::vector<u16> gadloop2(64);
std::vector<u16> gadloop3(64); static std::vector<u16> gadloop3(64);
// updates // updates
std::vector<u16> gupdates1(64); static std::vector<u16> gupdates1(64);
std::vector<u16> gupdates2(64); static std::vector<u16> gupdates2(64);
std::vector<u16> gupdates3(64); static std::vector<u16> gupdates3(64);
std::vector<u16> gupdates4(64); static std::vector<u16> gupdates4(64);
std::vector<u16> gupdates5(64); static std::vector<u16> gupdates5(64);
std::vector<u32> gupdates_addr(64); static std::vector<u32> gupdates_addr(64);
// Other things // Other things
std::vector<u16> Jump(64); // this is 1 or 0 static std::vector<u16> Jump(64); // this is 1 or 0
std::vector<int> musicLength(64); static std::vector<int> musicLength(64);
std::vector< std::vector<int> > vector1(64, std::vector<int>(100,0)); static std::vector< std::vector<int> > vector1(64, std::vector<int>(100,0));
std::vector<int> numberRunning(64); static std::vector<int> numberRunning(64);
int j = 0; static int j = 0;
int k = 0; static int k = 0;
s64 l = 0; static s64 l = 0;
int iupd = 0; static bool iupdonce = false;
bool iupdonce = false; static std::vector<u16> viupd(15); // the length of the update frequency bar
std::vector<u16> viupd(15); // the length of the update frequency bar static int vectorLength = 15; // the length of the playback history bar and how long
int vectorLength = 15; // the length of the playback history bar and how long
// old blocks are shown // old blocks are shown
std::vector<u16> vector62(vectorLength); static std::vector<u16> vector62(vectorLength);
std::vector<u16> vector63(vectorLength); static std::vector<u16> vector63(vectorLength);
int ReadOutPBs(AXParamBlock * _pPBs, int _num); int ReadOutPBs(AXParamBlock * _pPBs, int _num);

View File

@ -127,7 +127,7 @@ FRAGMENTSHADER &GetOrCreateEncodingShader(u32 format)
if (!PixelShaderCache::CompilePixelShader(s_encodingPrograms[format], shader)) { if (!PixelShaderCache::CompilePixelShader(s_encodingPrograms[format], shader)) {
const char* error = cgGetLastListing(g_cgcontext); const char* error = cgGetLastListing(g_cgcontext);
ERROR_LOG(VIDEO, "Failed to create encoding fragment program"); ERROR_LOG(VIDEO, "Failed to create encoding fragment program:\n%s", error);
} }
} }

View File

@ -194,6 +194,7 @@ struct SDot
int Size; // Size of the IR dot (0-15) int Size; // Size of the IR dot (0-15)
int Order; // Increasing order from low to higher x-axis values int Order; // Increasing order from low to higher x-axis values
}; };
struct SIR struct SIR
{ {
SDot Dot[4]; SDot Dot[4];

View File

@ -276,7 +276,7 @@ void IRData2Dots(u8 *Data)
void ReorderIRDots() void ReorderIRDots()
{ {
// Create a shortcut // Create a shortcut
struct SDot* Dot = g_Wiimote_kbd.IR.Dot; SDot* Dot = g_Wiimote_kbd.IR.Dot;
// Variables // Variables
int i, j, order; int i, j, order;
@ -285,6 +285,7 @@ void ReorderIRDots()
for (i = 0; i < 4; ++i) for (i = 0; i < 4; ++i)
Dot[i].Order = 0; Dot[i].Order = 0;
// is this just a weird filter+sort?
for (order = 1; order < 5; ++order) for (order = 1; order < 5; ++order)
{ {
i = 0; i = 0;

View File

@ -212,10 +212,10 @@ private:
u16 m_channelID; u16 m_channelID;
CEventQueue m_EventReadQueue; // Read from Wiimote CEventQueue m_EventReadQueue; // Read from Wiimote
CEventQueue m_EventWriteQueue; // Write to Wiimote CEventQueue m_EventWriteQueue; // Write to Wiimote
Common::CriticalSection* m_pCriticalSection;
bool m_LastReportValid; bool m_LastReportValid;
SEvent m_LastReport; SEvent m_LastReport;
wiimote_t* m_pWiiMote; // This is g_WiiMotesFromWiiUse[] wiimote_t* m_pWiiMote; // This is g_WiiMotesFromWiiUse[]
Common::CriticalSection* m_pCriticalSection;
// Send queued data to the core // Send queued data to the core
void SendEvent(SEvent& _rEvent) void SendEvent(SEvent& _rEvent)