Merge pull request #210 from xsacha:plugin_cleanup

Some cleanup to improve readability.
This commit is contained in:
Pseudonym 2014-08-14 20:37:41 +01:00
commit cb2593f2bb
3 changed files with 8 additions and 43 deletions

View File

@ -32,8 +32,7 @@ static u32 gifqwc = 0;
static bool gifmfifoirq = false;
static __fi void clearFIFOstuff(bool full) {
if (full) CSRreg.FIFO = CSR_FIFO_FULL;
else CSRreg.FIFO = CSR_FIFO_EMPTY;
CSRreg.FIFO = full ? CSR_FIFO_FULL : CSR_FIFO_EMPTY;
}
void incGifChAddr(u32 qwc) {
@ -155,7 +154,8 @@ static __fi void GIFchain() {
// qwc check now done outside this function
// Voodoocycles
// >> 2 so Drakan and Tekken 5 don't mess up in some PATH3 transfer. Cycles to interrupt were getting huge..
/*if (gifch.qwc)*/ gscycles+= ( _GIFchain() * BIAS); /* guessing */
/*if (gifch.qwc)*/
gscycles+= _GIFchain() * BIAS; /* guessing */
}
static __fi bool checkTieBit(tDMA_TAG* &ptag)

View File

@ -89,23 +89,7 @@ typedef uint32 uptr;
using namespace std;
#ifdef _MSC_VER
#if _MSC_VER >= 1500
#include <memory>
#if _MSC_VER < 1600
using namespace std::tr1;
#else
using namespace std;
#endif
#endif
#endif
#ifdef __GNUC__
#include <memory>
#endif
#ifdef _WINDOWS
@ -126,11 +110,7 @@ using namespace std;
template<> class hash_compare<uint32>
{
public:
#if _MSC_VER >= 1500 && _MSC_VER < 1600
enum {bucket_size = 4, min_buckets = 8};
#else
enum {bucket_size = 1};
#endif
size_t operator()(uint32 key) const
{
@ -153,11 +133,7 @@ using namespace std;
template<> class hash_compare<uint64>
{
public:
#if _MSC_VER >= 1500 && _MSC_VER < 1600
enum {bucket_size = 4, min_buckets = 8};
#else
enum {bucket_size = 1};
#endif
size_t operator()(uint64 key) const
{
@ -253,7 +229,7 @@ struct aligned_free_second {template<class T> void operator()(T& p) {_aligned_fr
#define RESTRICT restrict
#elif _MSC_VER >= 1400
#elif defined(_MSC_VER)
#define RESTRICT __restrict
@ -305,17 +281,6 @@ struct aligned_free_second {template<class T> void operator()(T& p) {_aligned_fr
#define MXCSR (_MM_DENORMALS_ARE_ZERO | _MM_MASK_MASK | _MM_ROUND_NEAREST | _MM_FLUSH_ZERO_ON)
#if defined(_MSC_VER) && _MSC_VER < 1500
__forceinline __m128i _mm_castps_si128(__m128 a) {return *(__m128i*)&a;}
__forceinline __m128 _mm_castsi128_ps(__m128i a) {return *(__m128*)&a;}
__forceinline __m128i _mm_castpd_si128(__m128d a) {return *(__m128i*)&a;}
__forceinline __m128d _mm_castsi128_pd(__m128i a) {return *(__m128d*)&a;}
__forceinline __m128d _mm_castps_pd(__m128 a) {return *(__m128d*)&a;}
__forceinline __m128 _mm_castpd_ps(__m128d a) {return *(__m128*)&a;}
#endif
#define _MM_TRANSPOSE4_SI128(row0, row1, row2, row3) \
{ \
__m128 tmp0 = _mm_shuffle_ps(_mm_castsi128_ps(row0), _mm_castsi128_ps(row1), 0x44); \

View File

@ -117,7 +117,7 @@
#define CALLBACK
#endif
#define Sleep(x) sleep((x)*1000)
#define Sleep(x) usleep((x)*1000)
#endif
////////////////////////////////////////////////////////////////////////