[vlc-devel] [PATCH 4/7] vout/caca: remove sys->window
Thomas Guillem
thomas at gllm.fr
Thu Mar 26 16:33:50 CET 2020
Since vd->window can be used directly.
---
modules/video_output/caca.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 5fe85ef722..3b253d41fc 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -53,7 +53,6 @@ struct vout_display_sys_t {
block_fifo_t *fifo;
vlc_thread_t thread;
- vout_window_t *window;
vout_display_place_t place;
vlc_tick_t cursor_timeout;
@@ -74,7 +73,7 @@ noreturn static void *VoutDisplayEventKeyDispatch(void *data)
memcpy(&key, event->p_buffer, sizeof (key));
block_Release(event);
- vout_window_ReportKeyPress(sys->window, key);
+ vout_window_ReportKeyPress(vd->window, key);
vlc_restorecancel(cancel);
}
}
@@ -317,7 +316,7 @@ static void Manage(vout_display_t *vd)
case CACA_EVENT_MOUSE_MOTION:
caca_set_mouse(sys->dp, 1);
sys->cursor_deadline = vlc_tick_now() + sys->cursor_timeout;
- vout_window_ReportMouseMoved(sys->window,
+ vout_window_ReportMouseMoved(vd->window,
caca_get_event_mouse_x(&ev),
caca_get_event_mouse_y(&ev));
break;
@@ -330,10 +329,10 @@ static void Manage(vout_display_t *vd)
for (int i = 0; mouses[i].caca != -1; i++) {
if (mouses[i].caca == caca) {
if (caca_get_event_type(&ev) == CACA_EVENT_MOUSE_PRESS)
- vout_window_ReportMousePressed(sys->window,
+ vout_window_ReportMousePressed(vd->window,
mouses[i].vlc);
else
- vout_window_ReportMouseReleased(sys->window,
+ vout_window_ReportMouseReleased(vd->window,
mouses[i].vlc);
return;
}
@@ -341,7 +340,7 @@ static void Manage(vout_display_t *vd)
break;
}
case CACA_EVENT_QUIT:
- vout_window_ReportClose(sys->window);
+ vout_window_ReportClose(vd->window);
break;
default:
break;
@@ -452,7 +451,6 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
goto error;
}
- sys->window = vd->window;
const char *driver = NULL;
#ifdef __APPLE__
// Make sure we don't try to open a window.
--
2.20.1
More information about the vlc-devel
mailing list