diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2017-08-22 21:11:46 +0100 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2017-08-22 21:11:46 +0100 |
commit | 4cf843f7285120a96b004150adf4c3543128a807 (patch) | |
tree | 6a5ad4d970c708b1c44a97a6db4e9b2f645c4d81 /src | |
parent | dd8c5293705b2baeb5ca8c0a4fa9a594cd8e4cd9 (diff) | |
download | imv-4cf843f7285120a96b004150adf4c3543128a807.tar.gz |
Fix imv -h opening a window
Diffstat (limited to 'src')
-rw-r--r-- | src/imv.c | 11 | ||||
-rw-r--r-- | src/imv.h | 2 |
2 files changed, 7 insertions, 6 deletions
@@ -356,12 +356,13 @@ void imv_add_path(struct imv *imv, const char *path) imv_navigator_add(imv->navigator, path, imv->recursive_load); } -bool imv_run(struct imv *imv) +int imv_run(struct imv *imv) { - if(!setup_window(imv)) - return false; + if(imv->quit) + return 0; - imv->quit = false; + if(!setup_window(imv)) + return 1; /* cache current image's dimensions */ int iw = 0; @@ -508,7 +509,7 @@ bool imv_run(struct imv *imv) puts(imv_navigator_at(imv->navigator, i)); } - return false; + return 0; } static bool setup_window(struct imv *imv) @@ -29,7 +29,7 @@ bool imv_parse_args(struct imv *imv, int argc, char **argv); void imv_add_path(struct imv *imv, const char *path); -bool imv_run(struct imv *imv); +int imv_run(struct imv *imv); #endif |