Browse Source

framework: add zero-argument version of open_framework()

rdb 7 years ago
parent
commit
c634c455fd
2 changed files with 10 additions and 1 deletions
  1. 9 1
      panda/src/framework/pandaFramework.cxx
  2. 1 0
      panda/src/framework/pandaFramework.h

+ 9 - 1
panda/src/framework/pandaFramework.cxx

@@ -82,7 +82,7 @@ PandaFramework::
  * control parameters.
  */
 void PandaFramework::
-open_framework(int &argc, char **&argv) {
+open_framework() {
   if (_is_open) {
     return;
   }
@@ -162,6 +162,14 @@ open_framework(int &argc, char **&argv) {
   _event_handler.add_hook("window-event", event_window_event, this);
 }
 
+/**
+ * @deprecated See the version of open_framework() without arguments.
+ */
+void PandaFramework::
+open_framework(int &argc, char **&argv) {
+  open_framework();
+}
+
 /**
  * Should be called at the end of an application to close Panda.  This is
  * optional, as the destructor will do the same thing.

+ 1 - 0
panda/src/framework/pandaFramework.h

@@ -40,6 +40,7 @@ public:
   PandaFramework();
   virtual ~PandaFramework();
 
+  void open_framework();
   void open_framework(int &argc, char **&argv);
   void close_framework();