From a7fdb5838df96a40934cbac5e9827bb83f59cf75 Mon Sep 17 00:00:00 2001 From: killian Date: Sun, 27 Oct 2024 00:32:22 +0200 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=A8=20feature(platform/window.cpp):?= =?UTF-8?q?=20put=20SDL=5FCreateWindow=20flags=20in=20a=20define?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: killian --- src/platform/window.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/platform/window.cpp b/src/platform/window.cpp index 65e94d9..7713d7f 100644 --- a/src/platform/window.cpp +++ b/src/platform/window.cpp @@ -6,7 +6,7 @@ /* By: maldavid +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/10/04 17:36:44 by maldavid #+# #+# */ -/* Updated: 2024/01/16 07:59:21 by maldavid ### ########.fr */ +/* Updated: 2024/10/27 00:31:39 by kiroussa ### ########.fr */ /* */ /* ************************************************************************** */ @@ -14,6 +14,10 @@ #include #include +#ifndef __MLX_WINDOW_CREATE_FLAGS__ +# define __MLX_WINDOW_CREATE_FLAGS__ SDL_WINDOW_VULKAN | SDL_WINDOW_SHOWN +#endif // !__MLX_WINDOW_CREATE_FLAGS__ + namespace mlx { #if SDL_BYTEORDER == SDL_BIG_ENDIAN @@ -32,7 +36,7 @@ namespace mlx { if(title.find("vvaas") != std::string::npos) core::error::report(e_kind::message, "vvaas est mauvais"); - _win = SDL_CreateWindow(title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, w, h, SDL_WINDOW_VULKAN | SDL_WINDOW_SHOWN); + _win = SDL_CreateWindow(title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, w, h, __MLX_WINDOW_CREATE_FLAGS__); if(!_win) core::error::report(e_kind::fatal_error, std::string("unable to open a new window, ") + SDL_GetError()); _id = SDL_GetWindowID(_win); From 53bb936453e02f0306a08c8b2223dfed1f9e29b0 Mon Sep 17 00:00:00 2001 From: kbz_8 Date: Sun, 27 Oct 2024 00:34:41 +0200 Subject: [PATCH 2/3] fixed code style --- src/platform/window.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platform/window.cpp b/src/platform/window.cpp index 7713d7f..890bb39 100644 --- a/src/platform/window.cpp +++ b/src/platform/window.cpp @@ -14,9 +14,9 @@ #include #include -#ifndef __MLX_WINDOW_CREATE_FLAGS__ -# define __MLX_WINDOW_CREATE_FLAGS__ SDL_WINDOW_VULKAN | SDL_WINDOW_SHOWN -#endif // !__MLX_WINDOW_CREATE_FLAGS__ +#ifndef MLX_WINDOW_CREATE_FLAGS + #define MLX_WINDOW_CREATE_FLAGS SDL_WINDOW_VULKAN | SDL_WINDOW_SHOWN +#endif // MLX_WINDOW_CREATE_FLAGS namespace mlx { @@ -36,7 +36,7 @@ namespace mlx { if(title.find("vvaas") != std::string::npos) core::error::report(e_kind::message, "vvaas est mauvais"); - _win = SDL_CreateWindow(title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, w, h, __MLX_WINDOW_CREATE_FLAGS__); + _win = SDL_CreateWindow(title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, w, h, MLX_WINDOW_CREATE_FLAGS); if(!_win) core::error::report(e_kind::fatal_error, std::string("unable to open a new window, ") + SDL_GetError()); _id = SDL_GetWindowID(_win); From 8cf08d349080348e6c7e929a17c64fe80eb4b250 Mon Sep 17 00:00:00 2001 From: Thomas Arnaud Date: Fri, 22 Nov 2024 13:59:35 +0100 Subject: [PATCH 3/3] Edit valgrind.supp for libdbus & libnvidia lib --- valgrind.supp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/valgrind.supp b/valgrind.supp index 0e5f6fa..aee48d4 100644 --- a/valgrind.supp +++ b/valgrind.supp @@ -132,3 +132,29 @@ fun:_dbus* ... } +{ + dbus_memory_leak + Memcheck:Leak + match-leak-kinds: definite + fun:calloc + obj:/usr/lib/x86_64-linux-gnu/libdbus-1.so.* + ... + fun:dbus* + ... +} +{ + name + Memcheck:Leak + fun:* + ... + obj:*libnvidia-glcore.so* + ... +} +{ + name + Memcheck:Leak + fun:* + ... + obj:*libdbus-1.so* + ... +}