no /. in ffmpeg init_decode segv, build index fix audio wave, stop playback state...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mwindow.C
index 546444fe2bbd6b053ca1450298e2e4fc3ecdd9ad..66b37fa922be50e2c4c168ad7422fe9f7d262c19 100644 (file)
@@ -939,14 +939,7 @@ void MWindow::init_preferences()
 {
        preferences = new Preferences;
        preferences->load_defaults(defaults);
-       const char *lv2_path = getenv("LV2_PATH");
-       if( lv2_path && strcmp(lv2_path, preferences->lv2_path) ) {
-               strncpy(preferences->lv2_path, lv2_path, sizeof(preferences->lv2_path));
-               remove_plugin_index();
-       }
-       else if( !lv2_path && preferences->lv2_path[0] ) {
-               File::setenv_path("LV2_PATH",preferences->lv2_path, 0);
-       }
+       File::setenv_path("LV2_PATH",preferences->lv2_path, 1);
        session = new MainSession(this);
        session->load_defaults(defaults);
        // set x11_host, screens, window_config
@@ -2737,6 +2730,12 @@ void MWindow::create_objects(int want_gui,
        BC_WindowBase::get_resources()->vframe_shm = 1;
 }
 
+int MWindow::uses_opengl()
+{
+       if( !playback_3d || !playback_3d->running() ) return 0;
+       PlaybackConfig *playback_config = edl->session->playback_config;
+       return playback_config->vconfig->driver == PLAYBACK_X11_GL ? 1 : 0;
+}
 
 void MWindow::show_splash()
 {