mirror of https://github.com/PCSX2/pcsx2.git
Fixed up the Linux build.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1493 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
f166306276
commit
a72f0e6ee2
|
@ -1,4 +1,36 @@
|
|||
#include "PrecompiledHeader.h"
|
||||
/* Pcsx2 - Pc Ps2 Emulator
|
||||
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
/*
|
||||
* Original code from libcdvd by Hiryu & Sjeep (C) 2002
|
||||
* Modified by Florin for PCSX2 emu
|
||||
* Fixed CdRead by linuzappz
|
||||
*/
|
||||
|
||||
#ifdef __LINUX__
|
||||
// Just in case.
|
||||
#define __USE_LARGEFILE64
|
||||
#define __USE_FILE_OFFSET64
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#include "PrecompiledHeader.h"
|
||||
|
||||
#include "CDVDisoReader.h"
|
||||
|
||||
|
@ -23,9 +55,12 @@ int isoSectorSize = 0;
|
|||
int isoSectorOffset = 0;
|
||||
|
||||
#ifndef _WIN32
|
||||
// if this doesn't work in linux, sorry
|
||||
#define _ftelli64 ftell64
|
||||
#define _fseeki64 fseek64
|
||||
// if this doesn't work in linux, sorry. -gigaherz
|
||||
//
|
||||
// Hope this works. Think it will, but it isn't used yet.
|
||||
// CDVDiso uses ftell, then switches to ftello64 if it fails. -arcum42
|
||||
#define _ftelli64 ftello64
|
||||
#define _fseeki64 fseeko64
|
||||
#endif
|
||||
|
||||
// This var is used to detect resume-style behavior of the Pcsx2 emulator,
|
||||
|
|
|
@ -172,19 +172,16 @@ int IsoFS_readSectors(u32 lsn, u32 sectors, void *buf)
|
|||
{
|
||||
u32 i;
|
||||
u8* buff;
|
||||
int rmode;
|
||||
|
||||
for (i=0; i<sectors; i++)
|
||||
{
|
||||
if (CDVDreadTrack(lsn+i, CDVD_MODE_2048)==-1)
|
||||
return 0;
|
||||
if (CDVDreadTrack(lsn+i, CDVD_MODE_2048) == -1) return 0;
|
||||
|
||||
buff = CDVDgetBuffer();
|
||||
|
||||
if (buff==NULL)
|
||||
return 0;
|
||||
if (buff == NULL) return 0;
|
||||
|
||||
memcpy_fast((void*)((uptr)buf+2048*i), buff, 2048);break;//only data
|
||||
memcpy_fast((void*)((uptr)buf+2048*i), buff, 2048); //only data
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ noinst_LIBRARIES = libps2_cdvd.a
|
|||
|
||||
libps2_cdvd_a_SOURCES = \
|
||||
CDVD.cpp IsoFStools.cpp IsoFSdrv.cpp CdRom.cpp \
|
||||
CDVD.h CDVD_internal.h IsoFStools.h IsoFSdrv.h IsoFScdvd.h CdRom.h
|
||||
CDVD.h CDVD_internal.h IsoFStools.h IsoFSdrv.h IsoFScdvd.h CdRom.h \
|
||||
CDVDisoReader.cpp CDVDisoReader.h
|
||||
|
||||
#SUBDIRS =
|
||||
#SUBDIRS =
|
||||
|
|
Loading…
Reference in New Issue