From 5a272e01a2dd698f8d702a67fa6eafbbfe3dedb9 Mon Sep 17 00:00:00 2001 From: contritebserver Date: Wed, 31 Mar 2021 13:26:14 -0700 Subject: [PATCH] added optional command line arguement to override image filename addresses issue #6 --- example/example.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/example/example.c b/example/example.c index e3453e6..e6bcab5 100644 --- a/example/example.c +++ b/example/example.c @@ -203,12 +203,15 @@ static void key(GLFWwindow* window, int key, int scancode, int action, int mods) } } -int main() +int main(int argc, const char* argv[]) { GLFWwindow* window; const GLFWvidmode* mode; double time; + if(argc > 1) + imageFilename = argv[1]; + if (!glfwInit()) return -1;