Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-02-18 00:52:20 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-02-18 22:38:44 +0400
commit3f769776fe65aa121b26f6af38682b5ecf6a09aa (patch)
tree3b17fc177662b755e4b81c6900265b5e6f5db8ac /source/blender/windowmanager
parent90a86fecee6074f2c782f6f7b9ad21fb01c25db7 (diff)
Splash screen: use a retina resolution image for Mac OS X.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index c02cc456a46..a7d8cba4d20 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1767,8 +1767,19 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
extern char datatoc_splash_png[];
extern int datatoc_splash_png_size;
- ImBuf *ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_png,
- datatoc_splash_png_size, IB_rect, NULL, "<splash screen>");
+ extern char datatoc_splash_2x_png[];
+ extern int datatoc_splash_2x_png_size;
+
+ ImBuf *ibuf;
+
+ if (U.pixelsize == 2) {
+ ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_2x_png,
+ datatoc_splash_2x_png_size, IB_rect, NULL, "<splash screen>");
+ }
+ else {
+ ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_png,
+ datatoc_splash_png_size, IB_rect, NULL, "<splash screen>");
+ }
#else
ImBuf *ibuf = NULL;
#endif
@@ -1797,7 +1808,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
* with the OS when the splash shows, window clipping in this case gives
* ugly results and clipping the splash isn't useful anyway, just disable it [#32938] */
uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP);
-
+
/* XXX splash scales with pixelsize, should become widget-units */
but = uiDefBut(block, BUT_IMAGE, 0, "", 0, 0.5f * U.widget_unit, U.pixelsize * 501, U.pixelsize * 282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */
uiButSetFunc(but, wm_block_splash_close, block, NULL);