From 29a677364bcd43199eeb22e2865ede391b215926 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Thu, 9 Apr 2020 14:45:47 -0600 Subject: [PATCH] fix err in updating cuda drags --- cinelerra-5.1/plugins/mandelcuda/mandelbrotwindow.C | 7 +++---- cinelerra-5.1/plugins/nbodycuda/nbodywindow.C | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cinelerra-5.1/plugins/mandelcuda/mandelbrotwindow.C b/cinelerra-5.1/plugins/mandelcuda/mandelbrotwindow.C index a2b12db9..f1b05502 100644 --- a/cinelerra-5.1/plugins/mandelcuda/mandelbrotwindow.C +++ b/cinelerra-5.1/plugins/mandelcuda/mandelbrotwindow.C @@ -162,10 +162,9 @@ MandelbrotDrag::MandelbrotDrag(MandelbrotWindow *gui, int x, int y) int MandelbrotDrag::handle_event() { CWindowGUI *cwindow_gui = gui->plugin->server->mwindow->cwindow->gui; - int value = get_value(); - if( value ) { + if( get_value() ) { if( !gui->grab(cwindow_gui) ) { - update(value = 0); + update(*value = 0); flicker(10,50); } } @@ -177,7 +176,7 @@ int MandelbrotDrag::handle_ungrab() { CWindowGUI *cwindow_gui = gui->plugin->server->mwindow->cwindow->gui; int ret = gui->ungrab(cwindow_gui); - if( ret ) update(value = 0); + if( ret ) update(*value = 0); return ret; } diff --git a/cinelerra-5.1/plugins/nbodycuda/nbodywindow.C b/cinelerra-5.1/plugins/nbodycuda/nbodywindow.C index 546f9cbb..12c1fd9f 100644 --- a/cinelerra-5.1/plugins/nbodycuda/nbodywindow.C +++ b/cinelerra-5.1/plugins/nbodycuda/nbodywindow.C @@ -179,10 +179,9 @@ N_BodyDrag::N_BodyDrag(N_BodyWindow *gui, int x, int y) int N_BodyDrag::handle_event() { CWindowGUI *cwindow_gui = gui->plugin->server->mwindow->cwindow->gui; - int value = get_value(); - if( value ) { + if( get_value() ) { if( !gui->grab(cwindow_gui) ) { - update(value = 0); + update(*value = 0); flicker(10,50); } } @@ -194,7 +193,7 @@ int N_BodyDrag::handle_ungrab() { CWindowGUI *cwindow_gui = gui->plugin->server->mwindow->cwindow->gui; int ret = gui->ungrab(cwindow_gui); - if( ret ) update(value = 0); + if( ret ) update(*value = 0); return ret; } -- 2.26.2