mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
working input API
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user