mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 07:03:34 +00:00
improving vsupp file
This commit is contained in:
@@ -6,13 +6,14 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/04 17:36:44 by maldavid #+# #+# */
|
||||
/* Updated: 2023/11/25 11:48:26 by maldavid ### ########.fr */
|
||||
/* Updated: 2023/12/09 16:52:29 by kbz_8 ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <platform/window.h>
|
||||
#include <core/errors.h>
|
||||
#include <utils/icon_mlx.h>
|
||||
#include <iostream>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
@@ -40,14 +41,16 @@ namespace mlx
|
||||
|
||||
void MLX_Window::destroy() noexcept
|
||||
{
|
||||
if(_win)
|
||||
std::cout << "prout" << std::endl;
|
||||
if(_win != nullptr)
|
||||
{
|
||||
SDL_DestroyWindow(_win);
|
||||
if(_icon)
|
||||
_win = nullptr;
|
||||
}
|
||||
if(_icon != nullptr)
|
||||
{
|
||||
SDL_FreeSurface(_icon);
|
||||
}
|
||||
|
||||
MLX_Window::~MLX_Window()
|
||||
{
|
||||
destroy();
|
||||
_icon = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/10/04 21:53:12 by maldavid #+# #+# */
|
||||
/* Updated: 2023/12/08 19:05:31 by kbz_8 ### ########.fr */
|
||||
/* Updated: 2023/12/09 16:35:57 by kbz_8 ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace mlx
|
||||
|
||||
void destroy() noexcept;
|
||||
|
||||
~MLX_Window();
|
||||
~MLX_Window() = default;
|
||||
|
||||
private:
|
||||
SDL_Surface* _icon = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user