mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-16 15:49:43 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 402baa63f2 | |||
| e80cb487e6 | |||
| ee6e30ead9 | |||
| 4b7fcaca0f |
+1
-1
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user