add remder permit

This commit is contained in:
chatlanin
2025-01-22 14:48:22 +03:00
parent 10e51b4c74
commit a000e961d8
8 changed files with 18 additions and 11 deletions

View File

@@ -91,14 +91,12 @@ namespace VE
int glfw::width() const
{
auto d = static_cast<win_data*>(glfwGetWindowUserPointer(m_win));
return d->m_width;
return m_win_data.m_width;
}
int glfw::height() const
{
auto d = static_cast<win_data*>(glfwGetWindowUserPointer(m_win));
return d->m_height;
return m_win_data.m_height;
}
void glfw::update()
@@ -200,8 +198,10 @@ namespace VE
glfwSetWindowSizeCallback(m_win, [](GLFWwindow* w, int width, int height)
{
auto d = static_cast<win_data*>(glfwGetWindowUserPointer(w));
hack::log()(d->m_width);
d->m_width = width;
d->m_height = height;
hack::log()(d->m_width);
event e{ event_type::WINDOW_RESIZE, std::pair<float, float>{ static_cast<float>(width), static_cast<float>(height) } };
d->execute(e);