summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2016-04-03 17:01:06 +0200
committerPaweł Redman <pawel.redman@gmail.com>2016-04-03 17:01:06 +0200
commit3ef209bad0cd7c1ae83a65702633e43f5a91c97f (patch)
treece124f04fdd363499243afeeb45e1449a76f7a81 /src/ui.c
parentf1e955e7e9719aa82d1b32dac2bce62f26f75df7 (diff)
Compute fake conductivity (for PML).
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui.c b/src/ui.c
index f485cfe..4245603 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -268,9 +268,9 @@ void ui_event_window(SDL_Event *event, ui_window *uiw)
coords = calloc(3, sizeof(size_t));
assert(coords);
- coords[0] = sv->select[0] * fi->width;
- coords[1] = sv->select[1] * fi->height;
- coords[2] = sv->select[2] * fi->depth;
+ coords[0] = sv->select[0] * fi->dims[0];
+ coords[1] = sv->select[1] * fi->dims[1];
+ coords[2] = sv->select[2] * fi->dims[2];
itc_chan_push(&sv->sim->ctl, PHY_CMD_DEBUG,
coords);
@@ -464,9 +464,9 @@ void ui_draw_simview_bars(ui_window *uiw, float dt)
r_draw_rect(uiw->rw, 0, uiw->h - 4 * theme.font_size,
uiw->w, 3 * theme.font_size, theme.color_main);
- x = sv->select[0] * fi->width;
- y = sv->select[1] * fi->height;
- z = sv->select[2] * fi->depth;
+ x = sv->select[0] * fi->dims[0];
+ y = sv->select[1] * fi->dims[1];
+ z = sv->select[2] * fi->dims[2];
offs = z * fi->zstr + y * fi->ystr + x * fi->xstr;
r_draw_text(uiw->rw, 0, uiw->h - 4 * theme.font_size,