Compare commits

...

4 Commits

Author SHA1 Message Date
Patric Stout 402baa63f2 Doc: Changelog for 13.2.1 (#10988) 2023-06-11 13:47:20 +02:00
Patric Stout e80cb487e6 Doc: Bump release version. 2023-06-11 13:42:31 +02:00
Patric Stout ee6e30ead9 Fix: make 13.2.1 act like 13.2 for networking 2023-06-11 13:42:31 +02:00
Patric Stout 4b7fcaca0f Fix 07add7a9: [Win32] use full monitor resolution for fullscreen (#10985)
On Windows in fullscreen you cannot reach the top with
the cursor for the halve of the height of your toolbar.

Additionally, on Win10 in fullscreen you can see the actual toolbar.
2023-06-11 13:42:31 +02:00
4 changed files with 21 additions and 7 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ if(NOT BINARY_NAME)
endif()
project(${BINARY_NAME}
VERSION 13.1
VERSION 13.2
)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
+5
View File
@@ -1,3 +1,8 @@
13.2.1 (2023-06-11)
------------------------------------------------------------------------
Fix: [Win32] use full monitor resolution for fullscreen (#10985)
13.2 (2023-06-10)
------------------------------------------------------------------------
Change: [Win32] position window in center of workspace of primary display (#10942)
+4
View File
@@ -47,6 +47,10 @@ std::string_view GetNetworkRevisionString()
if (network_revision.empty()) {
network_revision = _openttd_revision;
if (_openttd_revision_tagged) {
/* 13.2.1 is a fix-release with only a single change in the Win32 video driver.
* As such, it is safe to call it 13.2 from a networking point of view. */
if (network_revision == "13.2.1") network_revision = "13.2";
/* Tagged; do not mangle further, though ensure it's not too long. */
if (network_revision.size() >= NETWORK_REVISION_LENGTH) network_revision.resize(NETWORK_REVISION_LENGTH - 1);
} else {
+11 -6
View File
@@ -212,13 +212,18 @@ bool VideoDriver_Win32Base::MakeWindow(bool full_screen, bool resize)
if (this->main_wnd != nullptr) {
if (!_window_maximize && resize) SetWindowPos(this->main_wnd, 0, 0, 0, w, h, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOMOVE);
} else {
/* Center on the workspace of the primary display. */
MONITORINFO mi;
mi.cbSize = sizeof(mi);
GetMonitorInfo(MonitorFromWindow(0, MONITOR_DEFAULTTOPRIMARY), &mi);
int x = 0;
int y = 0;
int x = (mi.rcWork.right - mi.rcWork.left - w) / 2;
int y = (mi.rcWork.bottom - mi.rcWork.top - h) / 2;
/* For windowed mode, center on the workspace of the primary display. */
if (!this->fullscreen) {
MONITORINFO mi;
mi.cbSize = sizeof(mi);
GetMonitorInfo(MonitorFromWindow(0, MONITOR_DEFAULTTOPRIMARY), &mi);
x = (mi.rcWork.right - mi.rcWork.left - w) / 2;
y = (mi.rcWork.bottom - mi.rcWork.top - h) / 2;
}
char window_title[64];
seprintf(window_title, lastof(window_title), "OpenTTD %s", _openttd_revision);