aboutsummaryrefslogtreecommitdiff
path: root/nk_pugl
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-08-12 23:05:53 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-08-12 23:05:53 +0200
commit0db5050fb508d4acf9c44bed96833b515068be4f (patch)
tree83cc9781cd79f3def2d0cfbb9c471140ef1119e5 /nk_pugl
parent40c397bcc1cb8fbf81c24844f01172d73a1714fa (diff)
parentb067d8ec2f789cde7eac3184385cab03b39b76d0 (diff)
downloadsynthpod-0db5050fb508d4acf9c44bed96833b515068be4f.tar.xz
Merge commit 'b067d8ec2f789cde7eac3184385cab03b39b76d0'
Diffstat (limited to 'nk_pugl')
-rw-r--r--nk_pugl/nk_pugl.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/nk_pugl/nk_pugl.h b/nk_pugl/nk_pugl.h
index 9b119a09..eb6f0414 100644
--- a/nk_pugl/nk_pugl.h
+++ b/nk_pugl/nk_pugl.h
@@ -454,7 +454,7 @@ _nk_pugl_resize(nk_pugl_window_t *win)
if(cfg->host_resize)
{
cfg->host_resize->ui_resize(cfg->host_resize->handle,
- cfg->width*win->scale, cfg->height*win->scale);
+ cfg->width, cfg->height);
}
}
@@ -469,7 +469,7 @@ _nk_pugl_reconfigure(nk_pugl_window_t *win)
puglLeaveContext(win->view, false);
#if 0
- if(!win->cfg->resizable)
+ if(win->cfg.resizable)
_nk_pugl_resize(win);
#endif
}
@@ -1005,11 +1005,16 @@ nk_pugl_init(nk_pugl_window_t *win)
win->scale = 0.5;
win->has_left = true;
+ cfg->width *= win->scale;
+ cfg->height *= win->scale;
+ cfg->min_width *= win->scale;
+ cfg->min_height *= win->scale;
+
// init pugl
win->view = puglInit(NULL, NULL);
puglInitWindowClass(win->view, cfg->class ? cfg->class : "nuklear");
- puglInitWindowSize(win->view, cfg->width*win->scale, cfg->height*win->scale);
- puglInitWindowMinSize(win->view, cfg->min_width*win->scale, cfg->min_height*win->scale);
+ puglInitWindowSize(win->view, cfg->width, cfg->height);
+ puglInitWindowMinSize(win->view, cfg->min_width, cfg->min_height);
puglInitResizable(win->view, cfg->resizable);
if(cfg->fixed_aspect)
puglInitWindowAspectRatio(win->view, cfg->width, cfg->height, cfg->width, cfg->height);