add remder permit
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user