basic command line support.

This commit is contained in:
Jean-François DEL NERO
2024-06-21 12:56:09 +02:00
parent 1897bb4302
commit adfe0fc0fa
4 changed files with 12 additions and 6 deletions
@@ -947,7 +947,7 @@ static void tick_mw(void *v) {
Fl::repeat_timeout(0.10, tick_mw, v);
}
Main_Window::Main_Window()
Main_Window::Main_Window(int argc, char **argv)
: Fl_Window(WINDOW_XSIZE,428)
{
int i,j;
@@ -1584,6 +1584,12 @@ Main_Window::Main_Window()
print_dbg((char*)"Main_Window : All done !");
#endif
if(argc > 1)
{
if(argv[1])
load_file(argv[1]);
}
Fl::run();
}
@@ -36,7 +36,7 @@ class Main_Window : public Fl_Window {
Fl_Output* track_pos_str;
Fl_Output* file_name_txt;
Main_Window();
Main_Window(int argc, char **argv);
~Main_Window();
};
+1 -1
View File
@@ -94,7 +94,7 @@ int main(int argc, char **argv)
{
memset(guicontext,0,sizeof(s_gui_context));
new Main_Window();
new Main_Window(argc, argv);
return 0;
}
+3 -3
View File
@@ -1,6 +1,6 @@
#define FILE_VERSION 2,15,7,2
#define STR_FILE_VERSION "2,15,7,2\0"
#define STR_FILE_VERSION2 "2.15.7.2"
#define FILE_VERSION 2,15,8,1
#define STR_FILE_VERSION "2,15,8,1\0"
#define STR_FILE_VERSION2 "2.15.8.1"
#define STR_DATE "21 Jun 2024\0"
#define NOMFENETRE "HxCFloppyEmulator v" STR_FILE_VERSION2