aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source/pybase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill/py/source/pybase.cpp')
-rw-r--r--externals/grill/py/source/pybase.cpp36
1 files changed, 12 insertions, 24 deletions
diff --git a/externals/grill/py/source/pybase.cpp b/externals/grill/py/source/pybase.cpp
index d569a84c..2457974f 100644
--- a/externals/grill/py/source/pybase.cpp
+++ b/externals/grill/py/source/pybase.cpp
@@ -433,20 +433,21 @@ void pybase::AddToPath(const char *dir)
}
}
-void pybase::AddCurrentPath(t_canvas *cnv)
+void pybase::AddCurrentPath(flext_base *o)
{
-#if FLEXT_SYS == FLEXT_SYS_PD
- // add dir of current patch to path
- AddToPath(GetString(canvas_getdir(cnv)));
+ char dir[1024];
+
+ // add dir of current patch to path
+ o->GetCanvasDir(dir,sizeof(dir));
+ if(*dir) AddToPath(dir);
+
// add current dir to path
+#if FLEXT_SYS == FLEXT_SYS_PD
AddToPath(GetString(canvas_getcurrentdir()));
-#elif FLEXT_SYS == FLEXT_SYS_MAX
- char dir[1024];
- short path = patcher_myvol(cnv);
- path_topathname(path,NULL,dir);
- AddToPath(dir);
-#else
- #pragma message("Adding current dir to path is not implemented")
+#elif FLEXT_SYS == FLEXT_SYS_MAX
+ short path = path_getdefault();
+ path_topathname(path,NULL,dir);
+ AddToPath(dir);
#endif
}
@@ -699,19 +700,6 @@ void pybase::erasethreads()
}
#endif
-#if FLEXT_SYS == FLEXT_SYS_MAX
-short pybase::patcher_myvol(t_patcher *x)
-{
- t_box *w;
- if (x->p_vol)
- return x->p_vol;
- else if (w = (t_box *)x->p_vnewobj)
- return patcher_myvol(w->b_patcher);
- else
- return 0;
-}
-#endif
-
bool pybase::collect()
{
if(gcollect) {