minor changes to ghost
- use WITH_ASSERT_ABORT define, so GHOST_ASSERT will abort. - rename XTablet -> GHOST_TabletX11, was confusing since it was named like an xlib struct.
This commit is contained in:
parent
761ac89877
commit
f2cfe4b2e9
@ -58,12 +58,23 @@
|
|||||||
# define GHOST_PRINTF(x, ...)
|
# define GHOST_PRINTF(x, ...)
|
||||||
#endif // GHOST_DEBUG
|
#endif // GHOST_DEBUG
|
||||||
|
|
||||||
|
#ifdef WITH_ASSERT_ABORT
|
||||||
#ifdef GHOST_DEBUG
|
# include <stdio.h> //for fprintf()
|
||||||
|
# include <stdlib.h> //for abort()
|
||||||
# define GHOST_ASSERT(x, info) \
|
# define GHOST_ASSERT(x, info) \
|
||||||
{ \
|
{ \
|
||||||
if (!(x)) { \
|
if (!(x)) { \
|
||||||
GHOST_PRINT("assertion failed: "); \
|
fprintf(stderr, "GHOST_ASSERT failed: "); \
|
||||||
|
fprintf(stderr, info); \
|
||||||
|
fprintf(stderr, "\n"); \
|
||||||
|
abort(); \
|
||||||
|
} \
|
||||||
|
} (void)0
|
||||||
|
#elif defined(GHOST_DEBUG)
|
||||||
|
# define GHOST_ASSERT(x, info) \
|
||||||
|
{ \
|
||||||
|
if (!(x)) { \
|
||||||
|
GHOST_PRINT("GHOST_ASSERT failed: "); \
|
||||||
GHOST_PRINT(info); \
|
GHOST_PRINT(info); \
|
||||||
GHOST_PRINT("\n"); \
|
GHOST_PRINT("\n"); \
|
||||||
} \
|
} \
|
||||||
|
@ -196,9 +196,8 @@ public:
|
|||||||
getXWindow(
|
getXWindow(
|
||||||
);
|
);
|
||||||
#ifdef WITH_X11_XINPUT
|
#ifdef WITH_X11_XINPUT
|
||||||
class XTablet
|
typedef struct GHOST_TabletX11
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
GHOST_TabletData CommonData;
|
GHOST_TabletData CommonData;
|
||||||
|
|
||||||
XDevice *StylusDevice;
|
XDevice *StylusDevice;
|
||||||
@ -212,9 +211,9 @@ public:
|
|||||||
|
|
||||||
int PressureLevels;
|
int PressureLevels;
|
||||||
int XtiltLevels, YtiltLevels;
|
int XtiltLevels, YtiltLevels;
|
||||||
};
|
} GHOST_TabletX11;
|
||||||
|
|
||||||
XTablet& GetXTablet()
|
GHOST_TabletX11 &GetXTablet()
|
||||||
{
|
{
|
||||||
return m_xtablet;
|
return m_xtablet;
|
||||||
}
|
}
|
||||||
@ -388,7 +387,7 @@ private:
|
|||||||
|
|
||||||
#ifdef WITH_X11_XINPUT
|
#ifdef WITH_X11_XINPUT
|
||||||
/* Tablet devices */
|
/* Tablet devices */
|
||||||
XTablet m_xtablet;
|
GHOST_TabletX11 m_xtablet;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
|
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
|
||||||
|
@ -3100,4 +3100,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
WM_event_print(&event);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user