From 05a19a8c893bc7f2c951dd81ba3f94678c458a2c Mon Sep 17 00:00:00 2001 From: kdx Date: Sun, 16 Jul 2023 03:50:08 +0200 Subject: store image path --- src/FLD.hpp | 1 + src/image.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/FLD.hpp b/src/FLD.hpp index 9abe34a..d4bf4bf 100644 --- a/src/FLD.hpp +++ b/src/FLD.hpp @@ -48,6 +48,7 @@ public: Uint f = NONE; }; struct Image { + std::string path = ""; bool valid = true; SDL_Texture *ptr = nullptr; int width = 0; diff --git a/src/image.cpp b/src/image.cpp index f9fb1e2..177968a 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -40,6 +40,7 @@ FLD::image(const std::string &path) } images[path] = { + .path = path, .ptr = tex, .width = width, .height = height -- cgit v1.2.3