working input API

This commit is contained in:
Kbz-8
2023-04-12 21:53:14 +02:00
parent 0c79a0d01c
commit ff6fb56042
11 changed files with 182 additions and 75 deletions

View File

@@ -6,7 +6,7 @@
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/04 17:36:44 by maldavid #+# #+# */
/* Updated: 2023/04/02 15:39:59 by maldavid ### ########.fr */
/* Updated: 2023/04/12 18:45:05 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,11 +20,17 @@ namespace mlx
_win = SDL_CreateWindow(title.c_str(), SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, w, h, SDL_WINDOW_VULKAN | SDL_WINDOW_SHOWN);
if(!_win)
core::error::report(e_kind::fatal_error, std::string("unable to open a new window, ") + SDL_GetError());
_id = SDL_GetWindowID(_win);
}
MLX_Window::~MLX_Window()
void MLX_Window::destroy() noexcept
{
if(_win)
SDL_DestroyWindow(_win);
}
MLX_Window::~MLX_Window()
{
destroy();
}
}