mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Massive style & comment cleanup of (mostly) GL plugin - also split some large files. A minor speedup for BP writes - merged the two switch()-es.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@899 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -60,54 +60,4 @@ inline float Memory_Read_Float(u32 _uAddress)
|
||||
return *(float*)&uTemp;
|
||||
}
|
||||
|
||||
////
|
||||
// profiling
|
||||
///
|
||||
|
||||
extern int g_bWriteProfile; // global variable to enable/disable profiling (if DVPROFILE is defined)
|
||||
|
||||
// IMPORTANT: For every Register there must be an End
|
||||
void DVProfRegister(char* pname); // first checks if this profiler exists in g_listProfilers
|
||||
void DVProfEnd(u32 dwUserData);
|
||||
void DVProfWrite(char* pfilename, u32 frames = 0);
|
||||
void DVProfClear(); // clears all the profilers
|
||||
|
||||
// #define DVPROFILE // comment out to disable profiling
|
||||
|
||||
#if defined(DVPROFILE) && (defined(_WIN32)||defined(WIN32))
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
#ifndef __PRETTY_FUNCTION__
|
||||
#define __PRETTY_FUNCTION__ __FUNCTION__
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define DVSTARTPROFILE() DVProfileFunc _pf(__PRETTY_FUNCTION__);
|
||||
|
||||
class DVProfileFunc
|
||||
{
|
||||
public:
|
||||
u32 dwUserData;
|
||||
DVProfileFunc(char* pname) { DVProfRegister(pname); dwUserData = 0; }
|
||||
DVProfileFunc(char* pname, u32 dwUserData) : dwUserData(dwUserData) { DVProfRegister(pname); }
|
||||
~DVProfileFunc() { DVProfEnd(dwUserData); }
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
#define DVSTARTPROFILE()
|
||||
|
||||
class DVProfileFunc
|
||||
{
|
||||
public:
|
||||
u32 dwUserData;
|
||||
__forceinline DVProfileFunc(char* pname) {}
|
||||
__forceinline DVProfileFunc(char* pname, u32 dwUserData) { }
|
||||
~DVProfileFunc() {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user