Change working directory to first argument if present for Windows Drag

and Drop compatibility
This commit is contained in:
Dane Johnson 2021-04-26 21:10:07 -05:00
parent cf09235040
commit d658d7a300

View File

@ -1,3 +1,6 @@
// C includes
#include <unistd.h>
// C++ includes
#include <iostream>
@ -54,7 +57,12 @@ void render(Node *curr, Shader *shader, Matrix model) {
}
}
int main() {
int main(int argc, char *argv[]) {
if (argc == 2) {
chdir(argv[1]);
}
Window window;
window.Init();