Fix for r1600 missing parenthesis, which made it impossible to use an existing memcard

Added set as default to rightclick menu of memcard manager
compile fix for Jit64/Jit.cpp

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1610 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99 2008-12-20 18:43:52 +00:00
parent 7de995c00c
commit 011f857b24
3 changed files with 22 additions and 13 deletions

View File

@ -30,7 +30,7 @@
#define MC_STATUS_ERASEERROR 0x10
#define MC_STATUS_PROGRAMEERROR 0x08
#define MC_STATUS_READY 0x01
#define SIZE_TO_Mb 1024 * 8 * 16
#define SIZE_TO_Mb (1024 * 8 * 16)
static CEXIMemoryCard *cards[2];
@ -78,8 +78,9 @@ CEXIMemoryCard::CEXIMemoryCard(const std::string& _rName, const std::string& _rF
fseek(pFile, 0L, SEEK_SET);
memory_card_size = (int)MemFileSize;
PanicAlert("%X", memory_card_size);
nintendo_card_id = memory_card_size / SIZE_TO_Mb;
PanicAlert("%X", nintendo_card_id);
memory_card_content = new u8[memory_card_size];
memset(memory_card_content, 0xFF, memory_card_size);

View File

@ -440,7 +440,7 @@ namespace CPUCompare
//TODO
#endif
// get start tic
PROFILER_QUERY_PERFORMACE_COUNTER(&b.ticStart);
PROFILER_QUERY_PERFORMACE_COUNTER(&b->ticStart);
}
//Start up the register allocators
@ -468,9 +468,9 @@ namespace CPUCompare
// CAUTION!!! push on stack regs you use, do your stuff, then pop
PROFILER_VPUSH;
// get end tic
PROFILER_QUERY_PERFORMACE_COUNTER(&b.ticStop);
PROFILER_QUERY_PERFORMACE_COUNTER(&b->ticStop);
// tic counter += (end tic - start tic)
PROFILER_ADD_DIFF_LARGE_INTEGER(&b.ticCounter, &b.ticStop, &b.ticStart);
PROFILER_ADD_DIFF_LARGE_INTEGER(&b->ticCounter, &b->ticStop, &b->ticStart);
PROFILER_VPOP;
}
}

View File

@ -92,7 +92,7 @@ BEGIN_EVENT_TABLE(CMemcardManager, wxDialog)
EVT_FILEPICKER_CHANGED(ID_MEMCARDPATH_A,CMemcardManager::OnPathChange)
EVT_FILEPICKER_CHANGED(ID_MEMCARDPATH_B,CMemcardManager::OnPathChange)
EVT_MENU(ID_USEPAGES, CMemcardManager::OnMenuChange)
EVT_MENU_RANGE(ID_MEMCARDPATH_A, ID_USEPAGES, CMemcardManager::OnMenuChange)
EVT_MENU_RANGE(ID_COPYFROM_A, ID_CONVERTTOGCI, CMemcardManager::CopyDeleteClick)
EVT_MENU_RANGE(ID_NEXTPAGE_A, ID_PREVPAGE_B, CMemcardManager::OnPageChange)
EVT_MENU_RANGE(COLUMN_BANNER, NUMBER_OF_COLUMN, CMemcardManager::OnMenuChange)
@ -401,8 +401,9 @@ void CMemcardManager::OnPageChange(wxCommandEvent& event)
void CMemcardManager::OnMenuChange(wxCommandEvent& event)
{
if (event.GetId() == ID_USEPAGES)
switch(event.GetId())
{
case ID_USEPAGES:
m_MemcardList[SLOT_A]->usePages = !m_MemcardList[SLOT_A]->usePages;
m_MemcardList[SLOT_B]->usePages = !m_MemcardList[SLOT_B]->usePages;
if (!m_MemcardList[SLOT_A]->usePages)
@ -413,15 +414,20 @@ void CMemcardManager::OnMenuChange(wxCommandEvent& event)
m_NextPage[SLOT_B]->Disable();
page[SLOT_A] = page[SLOT_B] = FIRSTPAGE;
}
}
else
{
break;
case ID_MEMCARDPATH_A:
DefaultMemcard[SLOT_A] = m_MemcardPath[SLOT_A]->GetPath();
break;
case ID_MEMCARDPATH_B:
DefaultMemcard[SLOT_B] = m_MemcardPath[SLOT_B]->GetPath();
break;
default:
m_MemcardList[SLOT_A]->column[event.GetId()] = !m_MemcardList[SLOT_A]->column[event.GetId()];
m_MemcardList[SLOT_B]->column[event.GetId()] = !m_MemcardList[SLOT_B]->column[event.GetId()];
if (memoryCard[SLOT_A]) ReloadMemcard(m_MemcardPath[SLOT_A]->GetPath().mb_str(), SLOT_A);
if (memoryCard[SLOT_B]) ReloadMemcard(m_MemcardPath[SLOT_B]->GetPath().mb_str(), SLOT_B);
break;
}
if (memoryCard[SLOT_A]) ReloadMemcard(m_MemcardPath[SLOT_A]->GetPath().mb_str(), SLOT_A);
if (memoryCard[SLOT_B]) ReloadMemcard(m_MemcardPath[SLOT_B]->GetPath().mb_str(), SLOT_B);
}
bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
{
@ -760,6 +766,7 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
popupMenu.Append(ID_FIXCHECKSUM_A, wxT("Fix Checksum"));
popupMenu.Append(ID_PREVPAGE_A, wxT("Previous Page"));
popupMenu.Append(ID_NEXTPAGE_A, wxT("Next Page"));
popupMenu.Append(ID_MEMCARDPATH_A, wxT("Set as default Memcard A"));
if (!prevPage || !usePages)
popupMenu.FindItem(ID_PREVPAGE_A)->Enable(false);
if (!nextPage || !usePages)
@ -777,6 +784,7 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
popupMenu.Append(ID_FIXCHECKSUM_B, wxT("Fix Checksum"));
popupMenu.Append(ID_PREVPAGE_B, wxT("Previous Page"));
popupMenu.Append(ID_NEXTPAGE_B, wxT("Next Page"));
popupMenu.Append(ID_MEMCARDPATH_B, wxT("Set as default Memcard B"));
if (!prevPage || !usePages)
popupMenu.FindItem(ID_PREVPAGE_B)->Enable(false);
if (!nextPage || !usePages)