fixing compilation issues

This commit is contained in:
2024-09-15 09:03:52 +02:00
parent 596393ed20
commit a4b14baddd
2 changed files with 3 additions and 3 deletions

View File

@@ -8,7 +8,7 @@
Error("invalid window ptr (NULL)"); \ Error("invalid window ptr (NULL)"); \
return; \ return; \
} \ } \
else if(std::find_if(m_graphics.begin(), m_graphics.end(), [win](const std::unique_ptr<GraphicsSupport>& gs){ return *static_cast<int*>(win) == gs->GetID(); } != m_graphics.end())) \ else if(std::find_if(m_graphics.begin(), m_graphics.end(), [win](const std::unique_ptr<GraphicsSupport>& gs){ return *static_cast<int*>(win) == gs->GetID(); }) != m_graphics.end()) \
{ \ { \
Error("invalid window ptr"); \ Error("invalid window ptr"); \
return; \ return; \
@@ -63,7 +63,7 @@ namespace mlx
void Application::GetScreenSize(Handle win, int* w, int* h) noexcept void Application::GetScreenSize(Handle win, int* w, int* h) noexcept
{ {
CHECK_WINDOW_PTR(win); CHECK_WINDOW_PTR(win);
m_graphics[*static_cast<int*>(win)]->GetWindow()->GetScreenSizeWindowIsOn(x, y); m_graphics[*static_cast<int*>(win)]->GetWindow()->GetScreenSizeWindowIsOn(w, h);
} }
void Application::SetFPSCap(std::uint32_t fps) noexcept void Application::SetFPSCap(std::uint32_t fps) noexcept

View File

@@ -3,7 +3,7 @@
namespace mlx namespace mlx
{ {
GraphicsSupport::GraphicsSupport(std::size_t w, std::size_t h, NonOwningPtr<Texture> render_target, int id) : GraphicsSupport::GraphicsSupport([[maybe_unused]] std::size_t w, [[maybe_unused]] std::size_t h, NonOwningPtr<Texture> render_target, int id) :
m_put_pixel_manager(&m_renderer), m_put_pixel_manager(&m_renderer),
p_window(nullptr), p_window(nullptr),
m_id(id), m_id(id),