From 3ef209bad0cd7c1ae83a65702633e43f5a91c97f Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sun, 3 Apr 2016 17:01:06 +0200 Subject: Compute fake conductivity (for PML). --- src/ui.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ui.c') 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, -- cgit