mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
warning fixes
(may break sound on wii, look in the changelog of Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp if you wish to know why) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1306 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -86,8 +86,9 @@ CDebugger::CDebugger(wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
, m_GPRListView(NULL)
|
||||
//, gUpdFreq(5) // loaded from file
|
||||
, gPreset(0)
|
||||
, giShowAll(-1)
|
||||
, gPreset(0)
|
||||
|
||||
|
||||
, upd95(false) // block view settings
|
||||
, upd94(false)
|
||||
@ -217,7 +218,7 @@ SetTitle(wxT("Sound Debugging"));
|
||||
|
||||
|
||||
// Declarations
|
||||
wxBoxSizer * sMAIN, * sMain, * sMail, * sBlock;
|
||||
wxBoxSizer * sMAIN, * sMain, *_sMail, * sBlock;
|
||||
|
||||
wxButton* m_Upd;
|
||||
wxButton* m_SelC;
|
||||
@ -475,10 +476,10 @@ SetTitle(wxT("Sound Debugging"));
|
||||
wxBoxSizer * sMailRight = new wxBoxSizer(wxVERTICAL);
|
||||
//wxStaticBoxSizer * sMailRight = new wxStaticBoxSizer(wxVERTICAL, m_PageMail, wxT("Current"));
|
||||
|
||||
sMail = new wxBoxSizer(wxHORIZONTAL);
|
||||
sMail->Add(m_m1Sizer, 0, wxEXPAND | (wxUP | wxDOWN), 5); // margin = 5
|
||||
sMail->Add(m_m2Sizer, 1, wxEXPAND | (wxUP | wxDOWN | wxLEFT), 5); // margin = 5
|
||||
sMail->Add(sMailRight, 0, wxEXPAND | wxALL, 0); // margin = 0
|
||||
_sMail = new wxBoxSizer(wxHORIZONTAL);
|
||||
_sMail->Add(m_m1Sizer, 0, wxEXPAND | (wxUP | wxDOWN), 5); // margin = 5
|
||||
_sMail->Add(m_m2Sizer, 1, wxEXPAND | (wxUP | wxDOWN | wxLEFT), 5); // margin = 5
|
||||
_sMail->Add(sMailRight, 0, wxEXPAND | wxALL, 0); // margin = 0
|
||||
|
||||
sMailRight->Add(m_RadioBox[3], 0, wxALL, 5); // margin = 5
|
||||
sMailRight->Add(m_gameSizer1, 1, wxEXPAND | wxALL, 5); // margin = 5
|
||||
@ -515,7 +516,7 @@ SetTitle(wxT("Sound Debugging"));
|
||||
//sMAIN->SetSizeHints(this);
|
||||
|
||||
m_PageMain->SetSizer(sMain);
|
||||
m_PageMail->SetSizer(sMail);
|
||||
m_PageMail->SetSizer(_sMail);
|
||||
m_PageBlock->SetSizer(sBlock);
|
||||
//sMain->Layout();
|
||||
|
||||
@ -649,8 +650,8 @@ void CDebugger::OnOptions(wxCommandEvent& event)
|
||||
void CDebugger::OnShowAll(wxCommandEvent& event)
|
||||
{
|
||||
/// Only allow one selection at a time
|
||||
for (int i = 0; i < m_opt_showall->GetCount(); ++i)
|
||||
if(i != event.GetInt()) m_opt_showall->Check(i, false);
|
||||
for (u32 i = 0; i < m_opt_showall->GetCount(); ++i)
|
||||
if(i != (u32)event.GetInt()) m_opt_showall->Check(i, false);
|
||||
|
||||
if(m_opt_showall->IsChecked(0)) giShowAll = 0;
|
||||
else if(m_opt_showall->IsChecked(1)) giShowAll = 1;
|
||||
|
@ -98,7 +98,7 @@ class CDebugger : public wxDialog
|
||||
void MailSettings(wxCommandEvent& event);
|
||||
void Readfile(std::string FileName, bool GC);
|
||||
std::string Readfile_(std::string FileName);
|
||||
int CountFiles(std::string FileName);
|
||||
u32 CountFiles(std::string FileName);
|
||||
|
||||
// ============== Blocks
|
||||
void DoScrollBlocks();
|
||||
|
@ -145,7 +145,7 @@ void CDebugger::ReadDir()
|
||||
// --------------
|
||||
bool CDebugger::NoDuplicate(std::string FileName)
|
||||
{
|
||||
for (int i = 0; i < all_files.size(); i++)
|
||||
for (u32 i = 0; i < all_files.size(); i++)
|
||||
{
|
||||
if(all_files.at(i) == FileName)
|
||||
return false;
|
||||
@ -154,7 +154,7 @@ bool CDebugger::NoDuplicate(std::string FileName)
|
||||
}
|
||||
|
||||
// Count the number of files for each game
|
||||
int CDebugger::CountFiles(std::string FileName)
|
||||
u32 CDebugger::CountFiles(std::string FileName)
|
||||
{
|
||||
int match = 0;
|
||||
|
||||
@ -178,7 +178,6 @@ std::string CDebugger::Readfile_(std::string FileName)
|
||||
char c; // declare a char variable
|
||||
FILE *file; // declare a FILE pointer
|
||||
std::string sz = "";
|
||||
char ch[1] = "";
|
||||
|
||||
if(File::Exists(FileName.c_str()))
|
||||
file = fopen(FileName.c_str(), "r"); // open a text file for reading
|
||||
@ -201,18 +200,18 @@ std::string CDebugger::Readfile_(std::string FileName)
|
||||
break; // break when EOF is reached
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
return sz;
|
||||
fclose(file);
|
||||
}
|
||||
return sz;
|
||||
}
|
||||
|
||||
// Read file
|
||||
void CDebugger::Readfile(std::string FileName, bool GC)
|
||||
{
|
||||
int n = CountFiles(FileName); // count how many mails we have
|
||||
int curr_n = 0;
|
||||
u32 n = CountFiles(FileName); // count how many mails we have
|
||||
u32 curr_n = 0;
|
||||
std::ifstream file;
|
||||
for (int i = 0; i < m_RadioBox[3]->GetCount(); i++)
|
||||
for (u32 i = 0; i < m_RadioBox[3]->GetCount(); i++)
|
||||
{
|
||||
if(m_RadioBox[3]->IsItemEnabled(i)) curr_n++;
|
||||
m_RadioBox[3]->Enable(i, false); // disable all
|
||||
@ -220,7 +219,7 @@ void CDebugger::Readfile(std::string FileName, bool GC)
|
||||
//wprintf("Disabled all: n %i\n", n);
|
||||
|
||||
|
||||
for (int i = 0; i < n; i++)
|
||||
for (u32 i = 0; i < n; i++)
|
||||
{
|
||||
m_RadioBox[3]->Enable(i, true); // then anble the right ones
|
||||
//wprintf("m_RadioBox[3] enabled: %i\n", i);
|
||||
@ -253,25 +252,23 @@ void CDebugger::Readfile(std::string FileName, bool GC)
|
||||
// ---------------
|
||||
void CDebugger::OnGameChange(wxCommandEvent& event)
|
||||
{
|
||||
if(event.GetId() == 2006)
|
||||
if(event.GetId() == 2006)
|
||||
{
|
||||
// Only allow one selected game at a time
|
||||
for (int i = 0; i < m_gc->GetCount(); ++i)
|
||||
if(i != event.GetInt()) m_gc->Check(i, false);
|
||||
for (int i = 0; i < m_wii->GetCount(); ++i)
|
||||
m_wii->Check(i, false);
|
||||
Readfile(gc_files[event.GetInt()], true);
|
||||
// Only allow one selected game at a time
|
||||
for (u32 i = 0; i < m_gc->GetCount(); ++i)
|
||||
if(i != (u32)event.GetInt()) m_gc->Check(i, false);
|
||||
for (u32 i = 0; i < m_wii->GetCount(); ++i)
|
||||
m_wii->Check(i, false);
|
||||
Readfile(gc_files[event.GetInt()], true);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < m_gc->GetCount(); ++i)
|
||||
m_gc->Check(i, false);
|
||||
for (int i = 0; i < m_wii->GetCount(); ++i)
|
||||
if(i != event.GetInt()) m_wii->Check(i, false);
|
||||
Readfile(wii_files[event.GetInt()], false);
|
||||
for (u32 i = 0; i < m_gc->GetCount(); ++i)
|
||||
m_gc->Check(i, false);
|
||||
for (u32 i = 0; i < m_wii->GetCount(); ++i)
|
||||
if(i != (u32)event.GetInt()) m_wii->Check(i, false);
|
||||
Readfile(wii_files[event.GetInt()], false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Settings
|
||||
|
Reference in New Issue
Block a user