mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
baselayer: add DEBUG_FRAME_LOCKING functionality.
git-svn-id: https://svn.eduke32.com/eduke32@5311 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c9949f53a3
commit
3375bce927
3 changed files with 31 additions and 2 deletions
|
@ -199,9 +199,26 @@ int32_t setvideomode(int32_t x, int32_t y, int32_t c, int32_t fs);
|
|||
void getvalidmodes(void);
|
||||
void resetvideomode(void);
|
||||
|
||||
void begindrawing(void);
|
||||
//#define DEBUG_FRAME_LOCKING
|
||||
|
||||
void enddrawing(void);
|
||||
void showframe(int32_t);
|
||||
#if !defined DEBUG_FRAME_LOCKING
|
||||
void begindrawing(void);
|
||||
#else
|
||||
void begindrawing_real(void);
|
||||
# define BEGINDRAWING_SIZE 256
|
||||
extern uint32_t begindrawing_line[BEGINDRAWING_SIZE];
|
||||
extern const char *begindrawing_file[BEGINDRAWING_SIZE];
|
||||
extern int32_t lockcount;
|
||||
# define begindrawing() do { \
|
||||
if (lockcount < BEGINDRAWING_SIZE) { \
|
||||
begindrawing_line[lockcount] = __LINE__; \
|
||||
begindrawing_file[lockcount] = __FILE__; \
|
||||
} \
|
||||
begindrawing_real(); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
int32_t setpalette(int32_t start, int32_t num);
|
||||
//int32_t getpalette(int32_t start, int32_t num, char *dapal);
|
||||
|
|
|
@ -1583,11 +1583,17 @@ void resetvideomode(void)
|
|||
modeschecked = 0;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// begindrawing() -- locks the framebuffer for drawing
|
||||
//
|
||||
|
||||
#ifdef DEBUG_FRAME_LOCKING
|
||||
uint32_t begindrawing_line[BEGINDRAWING_SIZE];
|
||||
const char *begindrawing_file[BEGINDRAWING_SIZE];
|
||||
void begindrawing_real(void)
|
||||
#else
|
||||
void begindrawing(void)
|
||||
#endif
|
||||
{
|
||||
if (bpp > 8)
|
||||
{
|
||||
|
|
|
@ -1905,7 +1905,13 @@ void resetvideomode(void)
|
|||
//
|
||||
// begindrawing() -- locks the framebuffer for drawing
|
||||
//
|
||||
#ifdef DEBUG_FRAME_LOCKING
|
||||
uint32_t begindrawing_line[BEGINDRAWING_SIZE];
|
||||
const char *begindrawing_file[BEGINDRAWING_SIZE];
|
||||
void begindrawing_real(void)
|
||||
#else
|
||||
void begindrawing(void)
|
||||
#endif
|
||||
{
|
||||
if (bpp > 8)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue