diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-04-28 23:35:47 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-04-28 23:35:47 -0400 |
| commit | de6ed6f8e8c4a2d139b4e81b68db7408dbe435d1 (patch) | |
| tree | 765dde723df71633a1ae3681983057ef170f7ba6 /ui.c | |
| parent | e8f602a81b90a4147666f607045b359753537d72 (diff) | |
| download | volute-de6ed6f8e8c4a2d139b4e81b68db7408dbe435d1.zip | |
render: maintain list of images/icons
Diffstat (limited to 'ui.c')
| -rw-r--r-- | ui.c | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -4,9 +4,6 @@ #include <stdlib.h> #include <string.h> -#include <SDL2/SDL.h> -#include <SDL2/SDL_image.h> - #include "microui.h" #include "unit.h" #include "compressor.h" @@ -43,7 +40,6 @@ static void init_volume_flow_rate(UI *ui); static void init_mass_flow_rate(UI *ui); static void init_mass_flow_rate_corrected(UI *ui); static int init_comps(UI *ui); -static int init_comp_img(UI *ui); static void compute_pressure_ratio(UI *ui, int idx); static void compute_comp_outlet_temperature(UI *ui, int idx); static void compute_manifold_temperature(UI *ui, int idx); @@ -80,11 +76,6 @@ init_ui(UI *ui) { return 1; } - if (init_comp_img(ui) != 0) { - free_ui(ui); - return 1; - } - compute(ui, 0); return 0; @@ -94,7 +85,6 @@ void free_ui(UI *ui) { w_free_select_compressor(&ui->comp_select); free(ui->comps); - SDL_FreeSurface(ui->comp_img); } static void @@ -254,19 +244,6 @@ init_comps(UI *ui) { return 0; } -static int -init_comp_img(UI *ui) { - const Compressor *comp; - - comp = &ui->comps[ui->comp_select.idx]; - ui->comp_img = IMG_Load(comp->imgfile); - if (ui->comp_img == NULL) { - weprintf("failed to load %s", comp->imgfile); - return 1; - } - return 0; -} - void set_displacement(UI *ui) { int idx, i; |