diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-10-06 16:27:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-10-06 16:36:39 +0300 |
commit | 84713629877d84d8c973d55e7e7cb0eca0f2ba49 (patch) | |
tree | db12b860677dd59f3e3ffddb71c670de7aeb36d3 /source/blender/windowmanager/WM_api.h | |
parent | 867c49b962fed324b41492e4cbaf586b5020e2dd (diff) |
WM: Fix crash when a new window can't be created
Report an error instead of crashing if a new window can't be created
(typically caused by bad drivers).
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index abbbe759858..8aea5816b7f 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -87,18 +87,19 @@ void WM_init_splash (struct bContext *C); void WM_check (struct bContext *C); -struct wmWindow *WM_window_open (struct bContext *C, const struct rcti *rect); - int WM_window_pixels_x (struct wmWindow *win); int WM_window_pixels_y (struct wmWindow *win); bool WM_window_is_fullscreen (struct wmWindow *win); /* defines for 'type' WM_window_open_temp */ -#define WM_WINDOW_RENDER 0 -#define WM_WINDOW_USERPREFS 1 -// #define WM_WINDOW_FILESEL 2 // UNUSED +enum { + WM_WINDOW_RENDER = 1, + WM_WINDOW_USERPREFS, + // WM_WINDOW_FILESEL // UNUSED +}; -void WM_window_open_temp (struct bContext *C, struct rcti *position, int type); +struct wmWindow *WM_window_open(struct bContext *C, const struct rcti *rect); +struct wmWindow *WM_window_open_temp(struct bContext *C, const struct rcti *rect_init, int type); /* returns true if draw method is triple buffer */ bool WM_is_draw_triple(struct wmWindow *win); |