aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-11 10:16:04 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-11 10:16:04 +0000
commit5f56c7e9d550cd5adc3ef22e9848551f724f89d3 (patch)
tree1c4ae610630fbe7a1083176a5f6273824ef848b5 /main.c
parent87670b6a6de9afff403e5d71f0b703505b6cfab0 (diff)
downloadimv-5f56c7e9d550cd5adc3ef22e9848551f724f89d3.tar.gz
Show image dimensions in titlebar
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.c b/main.c
index 22113f3..e7a77ed 100644
--- a/main.c
+++ b/main.c
@@ -233,8 +233,9 @@ int main(int argc, char** argv)
if(imv_image_load(&img, current_path) != 0) {
imv_navigator_remove_current_path(&nav);
} else {
- char title[128];
- snprintf(&title[0], sizeof(title), "imv - %s", current_path);
+ char title[256];
+ snprintf(&title[0], sizeof(title), "imv - [%ix%i] %s",
+ img.width, img.height, current_path);
SDL_SetWindowTitle(window, (const char*)&title);
imv_viewport_reset(&view);
}