aboutsummaryrefslogtreecommitdiff
path: root/nk_pugl
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2017-08-12 23:08:04 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2017-08-12 23:08:04 +0200
commit5979373a8491721ff0351a5b8b72da74996f6f92 (patch)
tree49957ead9fc3768a67a7785f007c6d4c133244bd /nk_pugl
parent0933053d3c6f1b116b1e125757edaad9d2ba5ed0 (diff)
parent5afb7ffd0042f449e21a8016898c11a127547ab6 (diff)
downloadsherlock.lv2-5979373a8491721ff0351a5b8b72da74996f6f92.tar.xz
Merge commit '5afb7ffd0042f449e21a8016898c11a127547ab6'
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 9b119a0..eb6f041 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);