mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Linux: Fix ups for people running Linux. If it breaks anything, punch me in the face.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@30 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
#ifdef WIN32
|
||||
#include <io.h>
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "../../../../Externals/zlib/zlib.h"
|
||||
|
||||
#include "Blob.h"
|
||||
@ -103,7 +104,11 @@ class PlainFileReader
|
||||
PlainFileReader(const char* filename)
|
||||
{
|
||||
file_ = fopen(filename, "rb");
|
||||
fseek64(file_, 0, SEEK_END);
|
||||
#if 0
|
||||
fseek64(file_, 0, SEEK_END);
|
||||
#else
|
||||
fseek(file_, 0, SEEK_END); // I don't have fseek64 with gcc 4.3
|
||||
#endif
|
||||
size = ftell(file_);
|
||||
fseek(file_, 0, SEEK_SET);
|
||||
}
|
||||
|
@ -5,19 +5,12 @@ files = ["BannerLoader.cpp",
|
||||
"BannerLoaderWii.cpp",
|
||||
"Blob.cpp",
|
||||
"FileHandlerARC.cpp",
|
||||
"FileHandlerLZ77.cpp",
|
||||
"Filesystem.cpp",
|
||||
"FileSystemGCWii.cpp",
|
||||
"VolumeCreator.cpp",
|
||||
"VolumeGC.cpp",
|
||||
"VolumeWiiCrypted.cpp",
|
||||
"AES/aes_cbc.c",
|
||||
"AES/aes_cfb.c",
|
||||
"AES/aes_core.c",
|
||||
"AES/aes_ctr.c",
|
||||
"AES/aes_ecb.c",
|
||||
"AES/aes_ige.c",
|
||||
"AES/aes_misc.c",
|
||||
"AES/aes_ofb.c",
|
||||
]
|
||||
env.StaticLibrary("discio", files, LIBS = ["common"])
|
||||
|
@ -37,7 +37,13 @@ enum EDiscType
|
||||
DISC_TYPE_WII_CONTAINER,
|
||||
DISC_TYPE_GC
|
||||
};
|
||||
|
||||
#ifndef WIN32
|
||||
struct SPartition
|
||||
{
|
||||
u64 Offset;
|
||||
u32 Type;
|
||||
}; //gcc 4.3 cries if it's local
|
||||
#endif
|
||||
class CBlobBigEndianReader
|
||||
{
|
||||
public:
|
||||
@ -150,12 +156,13 @@ IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, int _VolumeType)
|
||||
|
||||
u32 numPartitions = Reader.Read32(0x40000);
|
||||
u64 PartitionsOffset = (u64)Reader.Read32(0x40004) << 2;
|
||||
|
||||
#ifdef WIN32
|
||||
struct SPartition
|
||||
{
|
||||
u64 Offset;
|
||||
u32 Type;
|
||||
};
|
||||
#endif
|
||||
std::vector<SPartition>PartitionsVec;
|
||||
|
||||
// read all partitions
|
||||
|
Reference in New Issue
Block a user