diff options
author | Joel Bodenmann <info@b-electronics.ch> | 2015-11-15 12:17:32 +0100 |
---|---|---|
committer | Joel Bodenmann <info@b-electronics.ch> | 2015-11-15 12:17:32 +0100 |
commit | 697211a85be7470097459146d06402cfe301db50 (patch) | |
tree | 8802ac9533552e5f77825a5a29fc395474b23b20 /src | |
parent | 10c047d0c0afd82f49695c598732df5ad12c0d08 (diff) | |
parent | 9ea93ff8e51dc7dd9ed12c6311886f5cce196157 (diff) | |
download | uGFX-697211a85be7470097459146d06402cfe301db50.tar.gz uGFX-697211a85be7470097459146d06402cfe301db50.tar.bz2 uGFX-697211a85be7470097459146d06402cfe301db50.zip |
Merged in woodyhawthorne/ugfx/fixes (pull request #20)
Fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/gmisc/gmisc.h | 2 | ||||
-rw-r--r-- | src/gwin/gwin_class.h | 2 | ||||
-rw-r--r-- | src/gwin/gwin_widget.c | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/gmisc/gmisc.h b/src/gmisc/gmisc.h index 8f858682..ebef8156 100644 --- a/src/gmisc/gmisc.h +++ b/src/gmisc/gmisc.h @@ -75,7 +75,9 @@ typedef int32_t fixed; /** * @brief The famous number pi */ +#ifndef PI #define PI 3.1415926535897932384626433832795028841971693993751 +#endif /** * @brief pi as a fixed point diff --git a/src/gwin/gwin_class.h b/src/gwin/gwin_class.h index d9e6d97e..c5c83bb0 100644 --- a/src/gwin/gwin_class.h +++ b/src/gwin/gwin_class.h @@ -321,7 +321,7 @@ bool_t _gwinWMAdd(GHandle gh, const GWindowInit *pInit); */ void _gwinSendEvent(GHandle gh, GEventType type); - #if (GFX_USE_GINPUT && GINPUT_NEED_KEYBOARD) || defined(__DOXYGEN__) + #if ((GFX_USE_GINPUT && GINPUT_NEED_KEYBOARD) || GWIN_NEED_KEYBOARD) || defined(__DOXYGEN__) /** * @brief Move the focus off the current focus window. * diff --git a/src/gwin/gwin_widget.c b/src/gwin/gwin_widget.c index 1bf91b11..a97e170a 100644 --- a/src/gwin/gwin_widget.c +++ b/src/gwin/gwin_widget.c @@ -21,7 +21,7 @@ // Our listener for events for widgets static GListener gl; -#if GFX_USE_GINPUT && GINPUT_NEED_KEYBOARD +#if (GFX_USE_GINPUT && GINPUT_NEED_KEYBOARD) || GWIN_NEED_KEYBOARD // Our current focus window static GHandle _widgetInFocus; #endif @@ -366,7 +366,7 @@ void _gwidgetInit(void) geventRegisterCallback(&gl, gwidgetEvent, 0); geventAttachSource(&gl, ginputGetMouse(GMOUSE_ALL_INSTANCES), GLISTEN_MOUSEMETA|GLISTEN_MOUSEDOWNMOVES); - #if GINPUT_NEED_KEYBOARD + #if GINPUT_NEED_KEYBOARD || GWIN_NEED_KEYBOARD geventAttachSource(&gl, ginputGetKeyboard(GKEYBOARD_ALL_INSTANCES), GLISTEN_KEYUP); #endif } |