diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-20 16:12:36 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-20 16:25:47 +0300 |
commit | b3b4b9fb8c255d2ec7cc7433ffcafef6311da6e9 (patch) | |
tree | 19ef8159594709ddbb031f4963b9bae5453faf96 | |
parent | 72cbf966fb9194edbe6fa82cfd02540dc306184a (diff) |
Fix WITH_HEADLESS build.
-rw-r--r-- | intern/ghost/intern/GHOST_SystemNULL.h | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemNULL.h b/intern/ghost/intern/GHOST_SystemNULL.h index 7c8d26d7486..ac3dfd71d63 100644 --- a/intern/ghost/intern/GHOST_SystemNULL.h +++ b/intern/ghost/intern/GHOST_SystemNULL.h @@ -53,6 +53,8 @@ public: void getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const { /* nop */ } void getAllDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const { /* nop */ } bool supportsNativeDialogs(void) { return false;} + GHOST_IContext *createOffscreenContext() { return NULL; } + GHOST_TSuccess disposeContext(GHOST_IContext *context) { return GHOST_kFailure; } GHOST_TSuccess init() { GHOST_TSuccess success = GHOST_System::init(); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index e2247b2adff..8b1cce27502 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -4569,7 +4569,11 @@ bool WM_window_modal_keymap_status_draw( continue; } int icon_mod[4]; +#ifdef WITH_HEADLESS + int icon = 0; +#else int icon = UI_icon_from_keymap_item(kmi, icon_mod); +#endif if (icon != 0) { for (int j = 0; j < ARRAY_SIZE(icon_mod) && icon_mod[j]; j++) { uiItemL(row, "", icon_mod[j]); |