mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Ban compression of Wii images until it has been tested. All sorts of minor cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@669 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -49,6 +49,11 @@
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifdef _WIN32
|
||||
#define fseek _fseeki64
|
||||
#define ftell _ftelli64
|
||||
#endif
|
||||
|
||||
#define POSIX 0
|
||||
#define NOMINMAX
|
||||
|
||||
|
@ -110,6 +110,8 @@ void CLogWindow::OnClear(wxCommandEvent& event)
|
||||
|
||||
void CLogWindow::OnEnableAll(wxCommandEvent& event)
|
||||
{
|
||||
if (!LogManager::m_Log[0])
|
||||
return;
|
||||
static bool enable = true;
|
||||
IniFile ini;
|
||||
ini.Load("Dolphin.ini");
|
||||
|
@ -26,6 +26,7 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "CompressedBlob.h"
|
||||
#include "FileUtil.h"
|
||||
#include "Hash.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
@ -35,11 +36,6 @@
|
||||
#include "../../../../Externals/zlib/zlib.h"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define fseek _fseeki64
|
||||
#endif
|
||||
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
|
||||
@ -163,6 +159,11 @@ void CompressedBlobReader::GetBlock(u64 block_num, u8 *out_ptr)
|
||||
bool CompressFileToBlob(const char* infile, const char* outfile, u32 sub_type,
|
||||
int block_size, CompressCB callback, void* arg)
|
||||
{
|
||||
if (File::GetSize(infile) > 2000000000ULL) {
|
||||
PanicAlert("Sorry - compressing Wii games not yet supported.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsCompressedBlob(infile))
|
||||
{
|
||||
PanicAlert("%s is already compressed! Cannot compress it further.", infile);
|
||||
|
@ -137,6 +137,7 @@ size_t CFileSystemGCWii::GetFileList(std::vector<const SFileInfo *> &_rFilenames
|
||||
if (_rFilenames.size())
|
||||
PanicAlert("GetFileList : input list has contents?");
|
||||
_rFilenames.clear();
|
||||
_rFilenames.reserve(m_FileInfoVector.size());
|
||||
for (size_t i = 0; i < m_FileInfoVector.size(); i++)
|
||||
_rFilenames.push_back(&m_FileInfoVector[i]);
|
||||
return m_FileInfoVector.size();
|
||||
@ -182,9 +183,11 @@ bool CFileSystemGCWii::InitFileSystem()
|
||||
|
||||
if (Root.IsDirectory())
|
||||
{
|
||||
m_FileInfoVector.clear();
|
||||
if (m_FileInfoVector.size())
|
||||
PanicAlert("Wtf?");
|
||||
u64 NameTableOffset = FSTOffset;
|
||||
|
||||
m_FileInfoVector.reserve(Root.m_FileSize);
|
||||
for (u32 i = 0; i < Root.m_FileSize; i++)
|
||||
{
|
||||
SFileInfo sfi;
|
||||
@ -194,7 +197,6 @@ bool CFileSystemGCWii::InitFileSystem()
|
||||
sfi.m_FileSize = Read32(Offset + 0x8);
|
||||
|
||||
m_FileInfoVector.push_back(sfi);
|
||||
|
||||
NameTableOffset += 0xC;
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ IVolume* CreateVolumeFromFilename(const std::string& _rFilename)
|
||||
{
|
||||
case DISC_TYPE_WII:
|
||||
case DISC_TYPE_GC:
|
||||
return(new CVolumeGC(pReader));
|
||||
return new CVolumeGC(pReader);
|
||||
|
||||
case DISC_TYPE_WII_CONTAINER:
|
||||
{
|
||||
@ -106,7 +106,7 @@ IVolume* CreateVolumeFromFilename(const std::string& _rFilename)
|
||||
|
||||
IVolume* CreateVolumeFromDirectory(const std::string& _rDirectory, bool _bIsWii)
|
||||
{
|
||||
if(CVolumeDirectory::IsValidDirectory(_rDirectory))
|
||||
if (CVolumeDirectory::IsValidDirectory(_rDirectory))
|
||||
return new CVolumeDirectory(_rDirectory, _bIsWii);
|
||||
|
||||
return NULL;
|
||||
|
@ -421,7 +421,7 @@ void CVolumeDirectory::WriteEntry(const File::FSTEntry& entry, u32& fstOffset, u
|
||||
m_virtualDisk.insert(make_pair(dataOffset, entry.physicalName));
|
||||
|
||||
// 4 byte aligned
|
||||
dataOffset = (dataOffset + entry.size + 3) & ~3;
|
||||
dataOffset = (dataOffset + entry.size + 3) & ~3ULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,63 +26,63 @@
|
||||
|
||||
class CGameListCtrl : public wxListCtrl
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
CGameListCtrl(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
|
||||
~CGameListCtrl();
|
||||
CGameListCtrl(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
|
||||
~CGameListCtrl();
|
||||
|
||||
void Update();
|
||||
void BrowseForDirectory();
|
||||
const GameListItem *GetSelectedISO() const;
|
||||
const GameListItem *GetISO(int index) const;
|
||||
void Update();
|
||||
void BrowseForDirectory();
|
||||
const GameListItem *GetSelectedISO() const;
|
||||
const GameListItem *GetISO(int index) const;
|
||||
|
||||
enum
|
||||
{
|
||||
COLUMN_BANNER = 0,
|
||||
COLUMN_TITLE,
|
||||
COLUMN_COMPANY,
|
||||
COLUMN_NOTES,
|
||||
COLUMN_COUNTRY,
|
||||
COLUMN_SIZE,
|
||||
COLUMN_EMULATION_STATE,
|
||||
NUMBER_OF_COLUMN
|
||||
};
|
||||
enum
|
||||
{
|
||||
COLUMN_BANNER = 0,
|
||||
COLUMN_TITLE,
|
||||
COLUMN_COMPANY,
|
||||
COLUMN_NOTES,
|
||||
COLUMN_COUNTRY,
|
||||
COLUMN_SIZE,
|
||||
COLUMN_EMULATION_STATE,
|
||||
NUMBER_OF_COLUMN
|
||||
};
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
std::vector<int> m_FlagImageIndex;
|
||||
std::vector<GameListItem> m_ISOFiles;
|
||||
std::vector<int> m_FlagImageIndex;
|
||||
std::vector<GameListItem> m_ISOFiles;
|
||||
|
||||
int last_column;
|
||||
int last_sort;
|
||||
int last_column;
|
||||
int last_sort;
|
||||
|
||||
void InitBitmaps();
|
||||
void InsertItemInReportView(long _Index);
|
||||
void SetBackgroundColor();
|
||||
void ScanForISOs();
|
||||
void InitBitmaps();
|
||||
void InsertItemInReportView(long _Index);
|
||||
void SetBackgroundColor();
|
||||
void ScanForISOs();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
// events
|
||||
void OnRightClick(wxMouseEvent& event);
|
||||
void OnColumnClick(wxListEvent& event);
|
||||
void OnColBeginDrag(wxListEvent& event);
|
||||
void OnColEndDrag(wxListEvent& event);
|
||||
void OnSelected(wxListEvent& event);
|
||||
void OnActivated(wxListEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnEditPatchFile(wxCommandEvent& event);
|
||||
void OnOpenContainingFolder(wxCommandEvent& event);
|
||||
void OnSetDefaultGCM(wxCommandEvent& event);
|
||||
void OnDeleteGCM(wxCommandEvent& event);
|
||||
void OnCompressGCM(wxCommandEvent& event);
|
||||
void OnFilesystemViewer(wxCommandEvent& event);
|
||||
// events
|
||||
void OnRightClick(wxMouseEvent& event);
|
||||
void OnColumnClick(wxListEvent& event);
|
||||
void OnColBeginDrag(wxListEvent& event);
|
||||
void OnColEndDrag(wxListEvent& event);
|
||||
void OnSelected(wxListEvent& event);
|
||||
void OnActivated(wxListEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnEditPatchFile(wxCommandEvent& event);
|
||||
void OnOpenContainingFolder(wxCommandEvent& event);
|
||||
void OnSetDefaultGCM(wxCommandEvent& event);
|
||||
void OnDeleteGCM(wxCommandEvent& event);
|
||||
void OnCompressGCM(wxCommandEvent& event);
|
||||
void OnFilesystemViewer(wxCommandEvent& event);
|
||||
|
||||
virtual bool MSWDrawSubItem(wxPaintDC& rPaintDC, int item, int subitem);
|
||||
virtual bool MSWDrawSubItem(wxPaintDC& rPaintDC, int item, int subitem);
|
||||
|
||||
void AutomaticColumnWidth();
|
||||
void AutomaticColumnWidth();
|
||||
|
||||
static void CompressCB(const char* text, float percent, void* arg);
|
||||
static void CompressCB(const char* text, float percent, void* arg);
|
||||
};
|
||||
|
||||
|
||||
|
@ -18,7 +18,8 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#ifdef WIN32
|
||||
#include "svnrev.h"
|
||||
#include <crtdbg.h>
|
||||
#include "svnrev.h"
|
||||
#endif
|
||||
#include "CPUDetect.h"
|
||||
#include "Globals.h"
|
||||
@ -69,6 +70,13 @@ LONG WINAPI MyUnhandledExceptionFilter(LPEXCEPTION_POINTERS e) {
|
||||
bool DolphinApp::OnInit()
|
||||
{
|
||||
DetectCPU();
|
||||
|
||||
#ifdef _DEBUG
|
||||
int tmpflag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
|
||||
tmpflag |= _CRTDBG_DELAY_FREE_MEM_DF;
|
||||
_CrtSetDbgFlag(tmpflag);
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
// RegisterPanicAlertHandler(&wxPanicAlert);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user