From 6c59c4c763d9f74b87db18e00ebf8a5e733bcfbc Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Wed, 30 Apr 2014 12:30:08 +0300 Subject: video_out_sdl: remove static variables --- src/video_out/video_out_sdl.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/video_out/video_out_sdl.c b/src/video_out/video_out_sdl.c index f2fd6a200..6058cd57d 100644 --- a/src/video_out/video_out_sdl.c +++ b/src/video_out/video_out_sdl.c @@ -98,6 +98,9 @@ struct sdl_driver_s { xine_t *xine; alphablend_t alphablend_extra_data; + + int last_gui_width; /* used when frontend does not provide frame_output_cb */ + int last_gui_height; }; typedef struct { @@ -281,14 +284,12 @@ static int sdl_redraw_needed (vo_driver_t *this_gen) { #else - static int last_gui_width, last_gui_height; - - if( last_gui_width != this->sc.gui_width || - last_gui_height != this->sc.gui_height || + if( this->last_gui_width != this->sc.gui_width || + this->last_gui_height != this->sc.gui_height || this->sc.force_redraw ) { - last_gui_width = this->sc.gui_width; - last_gui_height = this->sc.gui_height; + this->last_gui_width = this->sc.gui_width; + this->last_gui_height = this->sc.gui_height; sdl_compute_output_size (this); -- cgit v1.2.3