X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fmwindow.C;h=8b93262c4e6930cd53027d40c9b3b5f2309d1c67;hb=4e08719d4410d49f07ed681bdaf4a52b9a49ea41;hp=86e15ad796aeb7d994ec9e1f996f36a40c15311c;hpb=9b18af02dc4ccbf052ef9d70180a3d16c0f9848b;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/mwindow.C b/cinelerra-5.1/cinelerra/mwindow.C index 86e15ad7..8b93262c 100644 --- a/cinelerra-5.1/cinelerra/mwindow.C +++ b/cinelerra-5.1/cinelerra/mwindow.C @@ -3081,7 +3081,6 @@ void MWindow::set_auto_keyframes(int value) gui->mbuttons->edit_panel->keyframe->update(value); gui->flush(); cwindow->gui->lock_window("MWindow::set_auto_keyframes"); - cwindow->gui->edit_panel->keyframe->update(value); cwindow->gui->flush(); cwindow->gui->unlock_window(); } @@ -3092,7 +3091,6 @@ void MWindow::set_span_keyframes(int value) gui->mbuttons->edit_panel->span_keyframe->update(value); gui->flush(); cwindow->gui->lock_window("MWindow::set_span_keyframes"); - cwindow->gui->edit_panel->span_keyframe->update(value); cwindow->gui->flush(); cwindow->gui->unlock_window(); } @@ -4458,11 +4456,7 @@ void MWindow::remove_from_caches(Indexable *idxbl) delete gui->render_engine; gui->render_engine = 0; } - if( gui->resource_thread->render_engine_id == idxbl->id ) { - gui->resource_thread->render_engine_id = -1; - delete gui->resource_thread->render_engine; - gui->resource_thread->render_engine = 0; - } + gui->resource_thread->close_indexable(idxbl); if( !idxbl->is_asset ) return; Asset *asset = (Asset *)idxbl; audio_cache->delete_entry(asset); @@ -5085,3 +5079,17 @@ PatchGUI *MWindow::get_patchgui(Track *track) return patchgui; } +int MWindow::get_cpus(int out_w, int out_h) +{ + if( !out_w ) out_w = edl->session->output_w; + if( !out_h ) out_h = edl->session->output_h; + int cpus = out_w*out_h/0x80000 + 1; + if( cpus > preferences->processors ) + cpus = preferences->processors; + return cpus; +} +int MWindow::get_cpus() +{ + return get_cpus(edl->session->output_w, edl->session->output_h); +} +