This is a HUUUUUUUUUUUUUUUUUUUUUUGE commit, Make sure I didn't break too much ;p

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@926 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1
2008-10-20 22:31:55 +00:00
parent 6faea5668a
commit 9692f3dd9e
46 changed files with 1446 additions and 31 deletions

View File

@ -18,6 +18,7 @@
#ifndef __CONFIG_MAIN_h__
#define __CONFIG_MAIN_h__
#include <wx/wx.h>
#include <wx/gbsizer.h>
#include <wx/notebook.h>
#include <wx/filepicker.h>

View File

@ -18,6 +18,7 @@
#ifndef __FILESYSTEM_VIEWER_h__
#define __FILESYSTEM_VIEWER_h__
#include <wx/wx.h>
#include <wx/sizer.h>
#include <wx/filepicker.h>
#include <wx/statbmp.h>

View File

@ -31,6 +31,7 @@
#include "MemcardManager.h"
#include <wx/mstream.h>
#include <wx/aboutdlg.h>
// ----------------------------------------------------------------------------
// resources

View File

@ -1,9 +1,10 @@
#ifndef __FRAME_H_
#define __FRAME_H_
#include <wx/wx.h>
#include <wx/busyinfo.h>
class CGameListCtrl;
class CFrame
: public wxFrame
class CFrame : public wxFrame
{
public:

View File

@ -293,7 +293,7 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
// Item data
SetItemData(_Index, ItemIndex);
}
#ifdef _WIN32
bool CGameListCtrl::MSWDrawSubItem(wxPaintDC& rPaintDC, int item, int subitem)
{
bool Result = false;
@ -315,6 +315,7 @@ bool CGameListCtrl::MSWDrawSubItem(wxPaintDC& rPaintDC, int item, int subitem)
return(Result);
}
#endif
wxColour blend50(const wxColour& c1, const wxColour& c2)
{

View File

@ -78,7 +78,9 @@ private:
void OnMultiDecompressGCM(wxCommandEvent& event);
void OnFilesystemViewer(wxCommandEvent& event);
#ifdef _WIN32
virtual bool MSWDrawSubItem(wxPaintDC& rPaintDC, int item, int subitem);
#endif
void CompressSelection(bool _compress);
void AutomaticColumnWidth();

View File

@ -86,7 +86,7 @@ enum
//#include <wx/wxprec.h>
//#ifndef WX_PRECOMP
#if !defined(_LP64) && !defined(__APPLE__)
#if !defined(__APPLE__)
#include <wx/wx.h>
//#endif

View File

@ -36,7 +36,7 @@ public:
bool IsCompressed() const {return m_BlobCompressed;}
u64 GetFileSize() const {return m_FileSize;}
u64 GetVolumeSize() const {return m_VolumeSize;}
#if !defined(_LP64) && !defined(__APPLE__)
#if !defined(__APPLE__)
const wxImage& GetImage() const {return m_Image;}
#endif
@ -52,7 +52,7 @@ private:
DiscIO::IVolume::ECountry m_Country;
#if !defined(_LP64) && !defined(__APPLE__)
#if !defined(__APPLE__)
wxImage m_Image;
#endif
bool m_Valid;

View File

@ -71,19 +71,19 @@ wxBitmap wxBitmapFromMemoryRGBA(const unsigned char* data, int width, int height
}
BEGIN_EVENT_TABLE(CMemcardManager, wxDialog)
EVT_CLOSE(OnClose)
EVT_BUTTON(ID_COPYLEFT,CopyDeleteClick)
EVT_BUTTON(ID_COPYRIGHT,CopyDeleteClick)
EVT_BUTTON(ID_FIXCHECKSUM,CopyDeleteClick)
EVT_BUTTON(ID_DELETELEFT,CopyDeleteClick)
EVT_BUTTON(ID_DELETERIGHT,CopyDeleteClick)
EVT_BUTTON(ID_SAVEIMPORTRIGHT,CopyDeleteClick)
EVT_BUTTON(ID_SAVEEXPORTRIGHT,CopyDeleteClick)
EVT_BUTTON(ID_SAVEIMPORTLEFT,CopyDeleteClick)
EVT_BUTTON(ID_SAVEEXPORTLEFT,CopyDeleteClick)
EVT_BUTTON(ID_CONVERTTOGCI,CopyDeleteClick)
EVT_FILEPICKER_CHANGED(ID_MEMCARD1PATH,OnPathChange)
EVT_FILEPICKER_CHANGED(ID_MEMCARD2PATH,OnPathChange)
EVT_CLOSE(CMemcardManager::OnClose)
EVT_BUTTON(ID_COPYLEFT,CMemcardManager::CopyDeleteClick)
EVT_BUTTON(ID_COPYRIGHT,CMemcardManager::CopyDeleteClick)
EVT_BUTTON(ID_FIXCHECKSUM,CMemcardManager::CopyDeleteClick)
EVT_BUTTON(ID_DELETELEFT,CMemcardManager::CopyDeleteClick)
EVT_BUTTON(ID_DELETERIGHT,CMemcardManager::CopyDeleteClick)
EVT_BUTTON(ID_SAVEIMPORTRIGHT,CMemcardManager::CopyDeleteClick)
EVT_BUTTON(ID_SAVEEXPORTRIGHT,CMemcardManager::CopyDeleteClick)
EVT_BUTTON(ID_SAVEIMPORTLEFT,CMemcardManager::CopyDeleteClick)
EVT_BUTTON(ID_SAVEEXPORTLEFT,CMemcardManager::CopyDeleteClick)
EVT_BUTTON(ID_CONVERTTOGCI,CMemcardManager::CopyDeleteClick)
EVT_FILEPICKER_CHANGED(ID_MEMCARD1PATH,CMemcardManager::OnPathChange)
EVT_FILEPICKER_CHANGED(ID_MEMCARD2PATH,CMemcardManager::OnPathChange)
END_EVENT_TABLE()
CMemcardManager::CMemcardManager(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
@ -206,7 +206,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
int index1 = m_MemcardList[1]->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
int slot = 1;
int index2 = index1;
char * fileName2 = NULL;
std::string fileName2 = NULL;
switch(event.GetId())
{
@ -234,11 +234,10 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
}
break;
case ID_CONVERTTOGCI:
fileName2 = new char;
case ID_SAVEIMPORTLEFT:
slot = 0;
case ID_SAVEIMPORTRIGHT:
if (memoryCard[slot] != NULL || fileName2 != NULL)
if (memoryCard[slot] != NULL || !fileName2.empty())
{
wxString temp = wxFileSelector(_T("Select the GCI file to import"),
wxEmptyString, wxEmptyString, wxEmptyString,wxString::Format
@ -252,7 +251,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
),
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
const char * fileName = temp.ToAscii();
if (*fileName2 != NULL && !temp.empty())
if (!fileName2.empty() && !temp.empty())
{
wxString temp2 = wxFileSelector(_T("Save GCI as.."),
wxEmptyString, wxEmptyString, _T(".gci"), wxString::Format
@ -262,12 +261,11 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
wxFileSelectorDefaultWildcardStr
),
wxFD_OVERWRITE_PROMPT|wxFD_SAVE);
delete fileName2;
fileName2 = (char*)temp2.ToAscii();
fileName2 = temp2.mb_str();
}
if (temp.length() > 0)
{
switch(memoryCard[slot]->ImportGci(fileName, fileName2))
switch(memoryCard[slot]->ImportGci(fileName, fileName2.c_str()))
{
case LENGTHFAIL:
wxMessageBox(wxT("Imported file has invalid length"),