mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-06-17 16:17:02 +08:00
fix: fullscreen resolution error on Windows
This commit is contained in:
@@ -60,7 +60,8 @@ void Window::init() {
|
|||||||
m_height = config.get<int>("window.height");
|
m_height = config.get<int>("window.height");
|
||||||
if (config.get<bool>("window.fullscreen")) {
|
if (config.get<bool>("window.fullscreen")) {
|
||||||
GLFWmonitor* primary_monitor = glfwGetPrimaryMonitor();
|
GLFWmonitor* primary_monitor = glfwGetPrimaryMonitor();
|
||||||
m_window = glfwCreateWindow(m_width, m_height, "Cubed", primary_monitor, NULL);
|
const GLFWvidmode* mode = glfwGetVideoMode(primary_monitor);
|
||||||
|
m_window = glfwCreateWindow(mode->width, mode->height, "Cubed", primary_monitor, NULL);
|
||||||
} else {
|
} else {
|
||||||
m_window = glfwCreateWindow(m_width, m_height, "Cubed", NULL, NULL);
|
m_window = glfwCreateWindow(m_width, m_height, "Cubed", NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user