impr: Better experience when first starting ImHex (#1510)

This commit is contained in:
Nik
2024-01-21 18:39:51 +01:00
committed by GitHub
parent d005b5d2d9
commit 58603ed12a
33 changed files with 533 additions and 215 deletions

View File

@@ -159,6 +159,14 @@ namespace hex {
glfwPollEvents();
static ImVec2 lastWindowSize = ImHexApi::System::getMainWindowSize();
if (ImHexApi::System::impl::isWindowResizable()) {
glfwSetWindowSizeLimits(m_window, 480_scaled, 360_scaled, GLFW_DONT_CARE, GLFW_DONT_CARE);
lastWindowSize = ImHexApi::System::getMainWindowSize();
} else {
glfwSetWindowSizeLimits(m_window, lastWindowSize.x, lastWindowSize.y, lastWindowSize.x, lastWindowSize.y);
}
// Render frame
this->frameBegin();
this->frame();