You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Added OS::center_window to center the window precisely on desktop platforms
This commit is contained in:
committed by
Marcelo Fernandez
parent
7983fb95b0
commit
129e0f34d0
@@ -1486,6 +1486,12 @@ Size2 OS_Windows::get_window_size() const {
|
||||
GetClientRect(hWnd, &r);
|
||||
return Vector2(r.right - r.left, r.bottom - r.top);
|
||||
}
|
||||
Size2 OS_Windows::get_real_window_size() const {
|
||||
|
||||
RECT r;
|
||||
GetWindowRect(hWnd, &r);
|
||||
return Vector2(r.right - r.left, r.bottom - r.top);
|
||||
}
|
||||
void OS_Windows::set_window_size(const Size2 p_size) {
|
||||
|
||||
video_mode.width = p_size.width;
|
||||
|
||||
Reference in New Issue
Block a user