summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2e3d215..bdddd98 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -23,6 +23,7 @@
#include "ui.hpp"
#include "administration.hpp"
#include "administration_writer.hpp"
+#include "administration_reader.hpp"
// Data
static HWND hwnd;
@@ -58,7 +59,7 @@ void platorm_maximize_window()
// Main code
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
-int main()
+int main(int argc, char** argv)
{
int start_width = 1280;
int start_height = 800;
@@ -139,7 +140,13 @@ int main()
timer_lib_initialize();
administration_writer_create();
- administration_create_default("");
+
+ if (argc < 2) {
+ administration_create_default("");
+ }
+ else {
+ administration_reader_open_existing(argv[1]);
+ }
// Main loop
bool done = false;