From: Good Guy Date: Thu, 9 Apr 2020 20:45:47 +0000 (-0600) Subject: fix err in updating cuda drags X-Git-Tag: 2020-04~18 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=29a677364bcd43199eeb22e2865ede391b215926;p=goodguy%2Fcinelerra.git fix err in updating cuda drags --- 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; }