From bb8344c9168f1aca98f5534dc31e30a5a6eff4bf Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 24 Jan 2023 00:17:21 +0100 Subject: [PATCH 1/3] lv-tool: Fix crash on null VisVideo with VISUAL_EVENT_RESIZE --- libvisual/tools/lv-tool/lv-tool.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libvisual/tools/lv-tool/lv-tool.cpp b/libvisual/tools/lv-tool/lv-tool.cpp index 460e969ae..2f7029507 100644 --- a/libvisual/tools/lv-tool/lv-tool.cpp +++ b/libvisual/tools/lv-tool/lv-tool.cpp @@ -282,7 +282,7 @@ namespace { return m_screen_video; } - void drain_events(VisEventQueue & eventqueue) { + void drain_events(VisEventQueue & eventqueue, VisVideo * video) { // NOTE: SDL_VIDEORESIZE calls create(..) here as well SDL_Event event; while (SDL_PollEvent (&event)) { @@ -301,7 +301,7 @@ namespace { break; case SDL_VIDEORESIZE: - visual_event_queue_add_resize (&eventqueue, NULL, event.resize.w, event.resize.h); + visual_event_queue_add_resize (&eventqueue, video, event.resize.w, event.resize.h); // TODO non-NULL vidoptions here? create (m_requested_depth, nullptr, event.resize.w, event.resize.h, m_resizable); break; @@ -889,7 +889,7 @@ int main (int argc, char **argv) static VisEvent ev; // Handle all events - display.drain_events(*localqueue); + display.drain_events(*localqueue, video); auto pluginqueue = visual_plugin_get_eventqueue (visual_actor_get_plugin(bin.get_actor())); From dc22023075a2a5f9593bf12ffdc21b8e3545bcb0 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 24 Jan 2023 00:19:51 +0100 Subject: [PATCH 2/3] lv-tool: Stop calling create(..) twice per window resize --- libvisual/tools/lv-tool/lv-tool.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/libvisual/tools/lv-tool/lv-tool.cpp b/libvisual/tools/lv-tool/lv-tool.cpp index 2f7029507..2e4970c9d 100644 --- a/libvisual/tools/lv-tool/lv-tool.cpp +++ b/libvisual/tools/lv-tool/lv-tool.cpp @@ -283,7 +283,6 @@ namespace { } void drain_events(VisEventQueue & eventqueue, VisVideo * video) { - // NOTE: SDL_VIDEORESIZE calls create(..) here as well SDL_Event event; while (SDL_PollEvent (&event)) { switch (event.type) { @@ -302,8 +301,6 @@ namespace { case SDL_VIDEORESIZE: visual_event_queue_add_resize (&eventqueue, video, event.resize.w, event.resize.h); - // TODO non-NULL vidoptions here? - create (m_requested_depth, nullptr, event.resize.w, event.resize.h, m_resizable); break; case SDL_MOUSEMOTION: From 5a257cbb4441c674b2a2db2024e0c1f1350be8c7 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 27 Jan 2023 22:45:32 +0100 Subject: [PATCH 3/3] lv-tool: Sync translation --- libvisual/po/de.po | 4 ++-- libvisual/po/es_AR.po | 4 ++-- libvisual/po/es_ES.po | 4 ++-- libvisual/po/libvisual-0.4.pot | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libvisual/po/de.po b/libvisual/po/de.po index f6f8776f0..fc59557e4 100644 --- a/libvisual/po/de.po +++ b/libvisual/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libvisual 0.4.0-2.2\n" "Report-Msgid-Bugs-To: https://github.com/Libvisual/libvisual/issues/\n" -"POT-Creation-Date: 2023-01-27 01:58+0100\n" +"POT-Creation-Date: 2023-01-27 22:45+0100\n" "PO-Revision-Date: 2017-08-10 18:46+GMT\n" "Last-Translator: Chris Leick \n" "Language-Team: German \n" @@ -900,7 +900,7 @@ msgstr "" msgid "Invalid depth passed to the scaler" msgstr "Ungültige Tiefe an Scaler übergeben" -#: tools/lv-tool/lv-tool.cpp:819 tools/lv-tool/lv-tool.cpp:916 +#: tools/lv-tool/lv-tool.cpp:816 tools/lv-tool/lv-tool.cpp:913 msgid "lv-tool" msgstr "" diff --git a/libvisual/po/es_AR.po b/libvisual/po/es_AR.po index d0b777716..5fabb2add 100644 --- a/libvisual/po/es_AR.po +++ b/libvisual/po/es_AR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Libvisual Library 0.4.0\n" "Report-Msgid-Bugs-To: https://github.com/Libvisual/libvisual/issues/\n" -"POT-Creation-Date: 2023-01-27 01:58+0100\n" +"POT-Creation-Date: 2023-01-27 22:45+0100\n" "PO-Revision-Date: 2005-03-20 17:09-0300\n" "Last-Translator: \n" "Language-Team: Spanish\n" @@ -918,7 +918,7 @@ msgstr "" msgid "Invalid depth passed to the scaler" msgstr "Profundidad pasada al escalador inválida" -#: tools/lv-tool/lv-tool.cpp:819 tools/lv-tool/lv-tool.cpp:916 +#: tools/lv-tool/lv-tool.cpp:816 tools/lv-tool/lv-tool.cpp:913 msgid "lv-tool" msgstr "" diff --git a/libvisual/po/es_ES.po b/libvisual/po/es_ES.po index 8093b6c69..1d6fd63af 100644 --- a/libvisual/po/es_ES.po +++ b/libvisual/po/es_ES.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Libvisual Library 0.4.0\n" "Report-Msgid-Bugs-To: https://github.com/Libvisual/libvisual/issues/\n" -"POT-Creation-Date: 2023-01-27 01:58+0100\n" +"POT-Creation-Date: 2023-01-27 22:45+0100\n" "PO-Revision-Date: 2005-03-20 17:09-0300\n" "Last-Translator: \n" "Language-Team: Spanish\n" @@ -918,7 +918,7 @@ msgstr "" msgid "Invalid depth passed to the scaler" msgstr "Profundidad pasada al escalador inválida" -#: tools/lv-tool/lv-tool.cpp:819 tools/lv-tool/lv-tool.cpp:916 +#: tools/lv-tool/lv-tool.cpp:816 tools/lv-tool/lv-tool.cpp:913 msgid "lv-tool" msgstr "" diff --git a/libvisual/po/libvisual-0.4.pot b/libvisual/po/libvisual-0.4.pot index 13c3b73be..07b6b2fc6 100644 --- a/libvisual/po/libvisual-0.4.pot +++ b/libvisual/po/libvisual-0.4.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: libvisual 0.4.1\n" "Report-Msgid-Bugs-To: https://github.com/Libvisual/libvisual/issues/\n" -"POT-Creation-Date: 2023-01-27 01:58+0100\n" +"POT-Creation-Date: 2023-01-27 22:45+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -871,6 +871,6 @@ msgstr "" msgid "Invalid depth passed to the scaler" msgstr "" -#: tools/lv-tool/lv-tool.cpp:819 tools/lv-tool/lv-tool.cpp:916 +#: tools/lv-tool/lv-tool.cpp:816 tools/lv-tool/lv-tool.cpp:913 msgid "lv-tool" msgstr ""