diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index 1be34355df..7fd81d3ae0 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -78,7 +78,7 @@ bool Delete(const char *filename) if (IsDirectory(filename)) return false; #ifdef _WIN32 - DeleteFile(SanitizePath(filename).c_str()); + DeleteFile(filename); #else unlink(filename); #endif @@ -222,7 +222,7 @@ bool DeleteDir(const char *filename) bool Rename(const char *srcFilename, const char *destFilename) { - return (rename(SanitizePath(srcFilename).c_str(), SanitizePath(destFilename).c_str()) == 0); + return (rename(srcFilename, destFilename) == 0); } bool Copy(const char *srcFilename, const char *destFilename) diff --git a/Source/Plugins/Plugin_VideoDX9/Src/OpcodeReaders.cpp b/Source/Plugins/Plugin_VideoDX9/Src/OpcodeReaders.cpp deleted file mode 100644 index 223acd6d87..0000000000 --- a/Source/Plugins/Plugin_VideoDX9/Src/OpcodeReaders.cpp +++ /dev/null @@ -1,216 +0,0 @@ -#include "stdafx.h" -#include "OpcodeReaders.h" - -_u8 *readerMemPtr; -_u8 *bufPtr; -FifoData *gFifoData; -_u32 gDListEnd, gDListPtr; - -namespace OpcodeReaders -{ - void SetBufPtr(_u8 *_bufptr) - { - bufPtr = _bufptr; - } - void SetFifoData(FifoData *_fdata) - { - gFifoData = _fdata; - } - void SetMemPtr(_u8 *_mptr) - { - readerMemPtr = _mptr; - } - - void SetDListReader(_u32 _ptr, _u32 _end) - { - gDListPtr = _ptr & 0x1FFFFFF; - gDListEnd = _end & 0x1FFFFFF; - } - void DListReaderSkip(int _skip) - { - gDListPtr+=_skip; - } - bool IsDListOKToRead() - { - return gDListPtrreadptr+1)^3; - if (addr==gFifoData->gpend) - addr=gFifoData->gpbegin; - return readerMemPtr[addr]; -} -// ________________________________________________________________________________________________ -// ReadFifo8 -// -_u8 ReadFifo8() -{ - while ( - (gFifoData->readenable == false) || - (gFifoData->readptr == gFifoData->writeptr) || - (gFifoData->bpenable && (gFifoData->readptr == gFifoData->breakpt)) - ) - { - //if (gFifoData->readptr == gFifoData->breakpt) - // MessageBox(0,"hello breakpoint",0,0); - SwitchToFiber(gFifoData->cpuFiber); - } - - _u8 val = readerMemPtr[(gFifoData->readptr++)^3]; - - if (gFifoData->readptr == gFifoData->gpend) - gFifoData->readptr = gFifoData->gpbegin; - - return val; -} - -// ________________________________________________________________________________________________ -// ReadFifo16 -// -_u16 ReadFifo16() -{ - //PowerPC byte ordering :( - _u8 val1 = ReadFifo8(); - _u8 val2 = ReadFifo8(); - return (val1<<8)|(val2); -} - -// ________________________________________________________________________________________________ -// ReadFifo32 -// -_u32 ReadFifo32() -{ - //PowerPC byte ordering :( - _u8 val1 = ReadFifo8(); - _u8 val2 = ReadFifo8(); - _u8 val3 = ReadFifo8(); - _u8 val4 = ReadFifo8(); - return (val1<<24)|(val2<<16)|(val3<<8)|(val4); -} - -_u32 GetPtrFifo() -{ - return gFifoData->readptr; -} - -_u8 PeekDList8() -{ - if (gDListPtr>8); -} - -// ________________________________________________________________________________________________ -// ReadFifo32 -// -_u32 ReadBuf32() -{ -// _u32 val = *(_u32*)bufPtr; - //__asm -// { -// mov ebx,bufPtr -// mov eax,[ebx] -// add ebx,4 -// mov bufPtr,ebx -// bswap eax -// } - _u32 high = ReadBuf16(); - return (high<<16) | ReadBuf16(); -// return swap32(val); -} - - -ReaderInterface fifoReader = -{ - ReadFifo8, - PeekFifo8, - ReadFifo16, - ReadFifo32, - GetPtrFifo -}; - - -ReaderInterface dlistReader = -{ - ReadDList8, - PeekDList8, - ReadDList16, - ReadDList32, - GetPtrDList -}; - -ReaderInterface bufReader = -{ - ReadBuf8, - PeekBuf8, - ReadBuf16, - ReadBuf32, - 0 -}; - -ReaderInterface *reader; \ No newline at end of file diff --git a/Source/Plugins/Plugin_VideoDX9/Src/OpcodeReaders.h b/Source/Plugins/Plugin_VideoDX9/Src/OpcodeReaders.h deleted file mode 100644 index a253a40ce8..0000000000 --- a/Source/Plugins/Plugin_VideoDX9/Src/OpcodeReaders.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -#include "../plugin_specs/video.h" -#include "structs.h" - -struct ReaderInterface -{ - _u8 (*Read8) (void); - _u8 (*Peek8) (void); //to combine primitive draws.. - _u16 (*Read16)(void); - _u32 (*Read32)(void); - _u32 (*GetPtr)(void); -}; - -extern ReaderInterface *reader; -extern ReaderInterface fifoReader,dlistReader,bufReader; - -namespace OpcodeReaders -{ - void SetDListReader(_u32 _ptr, _u32 _end); - void DListReaderSkip(int _skip); - void SetMemPtr(_u8 *_mptr); - void SetFifoData(FifoData *_fdata); - bool IsDListOKToRead(); - - void SetBufPtr(_u8 *_bufptr); -} diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeReaders.cpp b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeReaders.cpp deleted file mode 100644 index f15b0f33c3..0000000000 --- a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeReaders.cpp +++ /dev/null @@ -1,215 +0,0 @@ -#include "OpcodeReaders.h" - -_u8 *readerMemPtr; -_u8 *bufPtr; -FifoData *gFifoData; -_u32 gDListEnd, gDListPtr; - -namespace OpcodeReaders -{ - void SetBufPtr(_u8 *_bufptr) - { - bufPtr = _bufptr; - } - void SetFifoData(FifoData *_fdata) - { - gFifoData = _fdata; - } - void SetMemPtr(_u8 *_mptr) - { - readerMemPtr = _mptr; - } - - void SetDListReader(_u32 _ptr, _u32 _end) - { - gDListPtr = _ptr & 0x1FFFFFF; - gDListEnd = _end & 0x1FFFFFF; - } - void DListReaderSkip(int _skip) - { - gDListPtr+=_skip; - } - bool IsDListOKToRead() - { - return gDListPtrreadptr+1)^3; - if (addr==gFifoData->gpend) - addr=gFifoData->gpbegin; - return readerMemPtr[addr]; -} -// ________________________________________________________________________________________________ -// ReadFifo8 -// -_u8 ReadFifo8() -{ - while ( - (gFifoData->readenable == false) || - (gFifoData->readptr == gFifoData->writeptr) || - (gFifoData->bpenable && (gFifoData->readptr == gFifoData->breakpt)) - ) - { - //if (gFifoData->readptr == gFifoData->breakpt) - // MessageBox(0,"hello breakpoint",0,0); - SwitchToFiber(gFifoData->cpuFiber); - } - - _u8 val = readerMemPtr[(gFifoData->readptr++)^3]; - - if (gFifoData->readptr == gFifoData->gpend) - gFifoData->readptr = gFifoData->gpbegin; - - return val; -} - -// ________________________________________________________________________________________________ -// ReadFifo16 -// -_u16 ReadFifo16() -{ - //PowerPC byte ordering :( - _u8 val1 = ReadFifo8(); - _u8 val2 = ReadFifo8(); - return (val1<<8)|(val2); -} - -// ________________________________________________________________________________________________ -// ReadFifo32 -// -_u32 ReadFifo32() -{ - //PowerPC byte ordering :( - _u8 val1 = ReadFifo8(); - _u8 val2 = ReadFifo8(); - _u8 val3 = ReadFifo8(); - _u8 val4 = ReadFifo8(); - return (val1<<24)|(val2<<16)|(val3<<8)|(val4); -} - -_u32 GetPtrFifo() -{ - return gFifoData->readptr; -} - -_u8 PeekDList8() -{ - if (gDListPtr>8); -} - -// ________________________________________________________________________________________________ -// ReadFifo32 -// -_u32 ReadBuf32() -{ -// _u32 val = *(_u32*)bufPtr; - //__asm -// { -// mov ebx,bufPtr -// mov eax,[ebx] -// add ebx,4 -// mov bufPtr,ebx -// bswap eax -// } - _u32 high = ReadBuf16(); - return (high<<16) | ReadBuf16(); -// return swap32(val); -} - - -ReaderInterface fifoReader = -{ - ReadFifo8, - PeekFifo8, - ReadFifo16, - ReadFifo32, - GetPtrFifo -}; - - -ReaderInterface dlistReader = -{ - ReadDList8, - PeekDList8, - ReadDList16, - ReadDList32, - GetPtrDList -}; - -ReaderInterface bufReader = -{ - ReadBuf8, - PeekBuf8, - ReadBuf16, - ReadBuf32, - 0 -}; - -ReaderInterface *reader; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeReaders.h b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeReaders.h deleted file mode 100644 index a253a40ce8..0000000000 --- a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeReaders.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -#include "../plugin_specs/video.h" -#include "structs.h" - -struct ReaderInterface -{ - _u8 (*Read8) (void); - _u8 (*Peek8) (void); //to combine primitive draws.. - _u16 (*Read16)(void); - _u32 (*Read32)(void); - _u32 (*GetPtr)(void); -}; - -extern ReaderInterface *reader; -extern ReaderInterface fifoReader,dlistReader,bufReader; - -namespace OpcodeReaders -{ - void SetDListReader(_u32 _ptr, _u32 _end); - void DListReaderSkip(int _skip); - void SetMemPtr(_u8 *_mptr); - void SetFifoData(FifoData *_fdata); - bool IsDListOKToRead(); - - void SetBufPtr(_u8 *_bufptr); -}