mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Passing main argument to open session
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
#define __UI_MANAGER_H_
|
#define __UI_MANAGER_H_
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <array>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include <gst/gstutils.h>
|
#include <gst/gstutils.h>
|
||||||
|
|||||||
8
main.cpp
8
main.cpp
@@ -58,6 +58,8 @@ void renderGUI()
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
std::string _openfile;
|
||||||
|
|
||||||
// one extra argument is given
|
// one extra argument is given
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
std::string argument(argv[1]);
|
std::string argument(argv[1]);
|
||||||
@@ -84,7 +86,8 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// try to open the file
|
// try to open the file
|
||||||
Mixer::manager().load(argument);
|
_openfile = argument;
|
||||||
|
fprintf(stderr, "Loading %s %s\n", argv[0], _openfile.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,6 +148,9 @@ int main(int argc, char *argv[])
|
|||||||
// show all windows
|
// show all windows
|
||||||
Rendering::manager().show();
|
Rendering::manager().show();
|
||||||
|
|
||||||
|
// try to load file given in argument
|
||||||
|
Mixer::manager().load(_openfile);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Main LOOP
|
/// Main LOOP
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user