Update to 1.9.3

--HG--
branch : openttd
This commit is contained in:
Pavel Stupnikov
2019-09-16 23:50:42 +03:00
parent 5131281a31
commit 93c4ebfa27
12 changed files with 74 additions and 50 deletions
+8
View File
@@ -1,3 +1,11 @@
1.9.3 (2019-09-16)
------------------------------------------------------------------------
- Change: Use natural sort when sorting the file list (#7727)
- Fix #7479: Don't close construction windows when changing client name (#7728)
- Fix #7731: Files sorting by modification time on Windows XP (#7731)
- Fix #7644: [OSX] Better solution for colourspace/performance issues (#7741)
1.9.3-RC1 (2019-09-07)
------------------------------------------------------------------------
- Add: Can now click industries to make orders to their neutral station (e.g. oil rig) (#7709)
+2 -2
View File
@@ -1,6 +1,6 @@
OpenTTD's known bugs
Last updated: 2019-09-07
Release version: 1.9.3-RC1
Last updated: 2019-09-16
Release version: 1.9.3
------------------------------------------------------------------------
+6
View File
@@ -1,3 +1,9 @@
openttd (1.9.3-0) unstable; urgency=low
* New upstream release 1.9.3
-- OpenTTD <info@openttd.org> Mon, 16 Sep 2019 21:00:00 +0200
openttd (1.9.3~RC1-0) unstable; urgency=low
* New upstream release 1.9.3-RC1
+2 -2
View File
@@ -17,9 +17,9 @@
#
Name: openttd
Version: 1.9.3-RC1
Version: 1.9.3
Release: 0
%define srcver 1.9.3-RC1
%define srcver 1.9.3
Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe
License: GPL-2.0
Group: Amusements/Games/Strategy/Other
+1 -1
View File
@@ -3,7 +3,7 @@
!define APPV_MINOR 9
!define APPV_MAINT 3
!define APPV_BUILD 0
!define APPV_EXTRA "-RC1"
!define APPV_EXTRA ""
!define APPNAME "OpenTTD" ; Define application name
!define APPVERSION "${APPV_MAJOR}.${APPV_MINOR}.${APPV_MAINT}${APPV_EXTRA}" ; Define application version
+1 -1
View File
@@ -46,7 +46,7 @@ public:
/** Factory for the SSE4 32 bpp blitter (with palette animation). */
class FBlitter_32bppSSE4_Anim: public BlitterFactory {
public:
FBlitter_32bppSSE4_Anim() : BlitterFactory("32bpp-sse4-anim", "SSE4 Blitter (palette animation)", HasCPUIDFlag(1, 2, 19)) {}
FBlitter_32bppSSE4_Anim() : BlitterFactory("32bpp-sse4-anim", "32bpp SSE4 Blitter (palette animation)", HasCPUIDFlag(1, 2, 19)) {}
/* virtual */ Blitter *CreateInstance() { return new Blitter_32bppSSE4_Anim(); }
};
+5 -2
View File
@@ -104,9 +104,12 @@ void SetLocalCompany(CompanyID new_company)
/* company could also be COMPANY_SPECTATOR or OWNER_NONE */
assert(Company::IsValidID(new_company) || new_company == COMPANY_SPECTATOR || new_company == OWNER_NONE);
/* If actually changing to another company, several windows need closing */
bool switching_company = _local_company != new_company;
#ifdef ENABLE_NETWORK
/* Delete the chat window, if you were team chatting. */
InvalidateWindowData(WC_SEND_NETWORK_MSG, DESTTYPE_TEAM, _local_company);
if (switching_company) InvalidateWindowData(WC_SEND_NETWORK_MSG, DESTTYPE_TEAM, _local_company);
#endif
assert(IsLocalCompany());
@@ -114,7 +117,7 @@ void SetLocalCompany(CompanyID new_company)
_current_company = _local_company = new_company;
/* Delete any construction windows... */
DeleteConstructionWindows();
if (switching_company) DeleteConstructionWindows();
/* ... and redraw the whole screen. */
MarkWholeScreenDirty();
+20 -4
View File
@@ -56,7 +56,7 @@ int CDECL CompareFiosItems(const FiosItem *da, const FiosItem *db)
if ((_savegame_sort_order & SORT_BY_NAME) == 0 && da->mtime != db->mtime) {
r = da->mtime < db->mtime ? -1 : 1;
} else {
r = strcasecmp(da->title, db->title);
r = strnatcmp(da->title, db->title);
}
if (_savegame_sort_order & SORT_DESCENDING) r = -r;
@@ -319,13 +319,29 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length, cons
FiosItem *fios = file_list.Append();
#ifdef _WIN32
struct _stat sb;
if (_tstat(OTTD2FS(filename), &sb) == 0) {
// Retrieve the file modified date using GetFileTime rather than stat to work around an obscure MSVC bug that affects Windows XP
HANDLE fh = CreateFile(OTTD2FS(filename), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, OPEN_EXISTING, 0, nullptr);
if (fh != INVALID_HANDLE_VALUE) {
FILETIME ft;
ULARGE_INTEGER ft_int64;
if (GetFileTime(fh, nullptr, nullptr, &ft) != 0) {
ft_int64.HighPart = ft.dwHighDateTime;
ft_int64.LowPart = ft.dwLowDateTime;
// Convert from hectonanoseconds since 01/01/1601 to seconds since 01/01/1970
fios->mtime = ft_int64.QuadPart / 10000000ULL - 11644473600ULL;
} else {
fios->mtime = 0;
}
CloseHandle(fh);
#else
struct stat sb;
if (stat(filename, &sb) == 0) {
#endif
fios->mtime = sb.st_mtime;
#endif
} else {
fios->mtime = 0;
}
+4 -4
View File
@@ -37,7 +37,7 @@ bool IsReleasedVersion()
*
* <modified> shows a "M", if the binary is made from modified source code.
*/
const char _openttd_revision[] = "1.9.3-RC1";
const char _openttd_revision[] = "1.9.3";
/**
* The text version of OpenTTD's build date.
@@ -50,7 +50,7 @@ const char _openttd_build_date[] = __DATE__ " " __TIME__;
/**
* The git revision hash of this version.
*/
const char _openttd_revision_hash[] = "e5021a0587c504df89a3e549544f3c9b78e8a4bd";
const char _openttd_revision_hash[] = "f6643952ce53b1823c2273964466f785a907ec1a";
/**
* Let us know if current build was modified. This detection
@@ -82,11 +82,11 @@ const byte _openttd_revision_tagged = 1;
* final release will always have a lower version number than the released
* version, thus making comparisons on specific revisions easy.
*/
const uint32 _openttd_newgrf_version = 1 << 28 | 9 << 24 | 3 << 20 | 0 << 19 | 28004;
const uint32 _openttd_newgrf_version = 1 << 28 | 9 << 24 | 3 << 20 | 1 << 19 | 28004;
#ifdef __MORPHOS__
/**
* Variable used by MorphOS to show the version.
*/
extern const char morphos_versions_tag[] = "$VER: OpenTTD 1.9.3-RC1 (08.09.19) OpenTTD Team [MorphOS, PowerPC]";
extern const char morphos_versions_tag[] = "$VER: OpenTTD 1.9.3 (16.09.19) OpenTTD Team [MorphOS, PowerPC]";
#endif
+1
View File
@@ -271,6 +271,7 @@ uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_i
- (BOOL)windowShouldClose:(id)sender;
- (void)windowDidEnterFullScreen:(NSNotification *)aNotification;
- (void)windowDidChangeScreenProfile:(NSNotification *)aNotification;
@end
+5
View File
@@ -1362,6 +1362,11 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count)
[ e release ];
}
}
/** The colour profile of the screen the window is on changed. */
- (void)windowDidChangeScreenProfile:(NSNotification *)aNotification
{
if (!driver->setup) driver->WindowResized();
}
@end
+19 -34
View File
@@ -106,35 +106,6 @@ public:
};
static CGColorSpaceRef QZ_GetCorrectColorSpace()
{
static CGColorSpaceRef colorSpace = NULL;
if (colorSpace == NULL) {
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (MacOSVersionIsAtLeast(10, 5, 0)) {
colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
} else
#endif
{
#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) && !defined(HAVE_OSX_1011_SDK)
CMProfileRef sysProfile;
if (CMGetSystemProfile(&sysProfile) == noErr) {
colorSpace = CGColorSpaceCreateWithPlatformColorSpace(sysProfile);
CMCloseProfile(sysProfile);
}
#endif
}
if (colorSpace == NULL) colorSpace = CGColorSpaceCreateDeviceRGB();
if (colorSpace == NULL) error("Could not get system colour space. You might need to recalibrate your monitor.");
}
return colorSpace;
}
@implementation OTTD_QuartzView
- (void)setDriver:(WindowQuartzSubdriver*)drv
@@ -289,9 +260,7 @@ bool WindowQuartzSubdriver::SetVideoMode(int width, int height, int bpp)
styleMask:style
backing:NSBackingStoreBuffered
defer:NO ];
if ([ this->window respondsToSelector:@selector(setColorSpace:) ]) {
[ this->window setColorSpace:[ [ [ NSColorSpace alloc ] initWithCGColorSpace:QZ_GetCorrectColorSpace() ] autorelease ] ];
}
if (this->window == nil) {
DEBUG(driver, 0, "Could not create the Cocoa window.");
this->setup = false;
@@ -598,20 +567,36 @@ bool WindowQuartzSubdriver::WindowResized()
this->window_width = (int)newframe.size.width;
this->window_height = (int)newframe.size.height;
/* Get screen colour space. */
CGColorSpaceRef color_space = NULL;
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if ([ this->window respondsToSelector:@selector(colorSpace) ]) {
color_space = [ [ this->window colorSpace ] CGColorSpace ];
CGColorSpaceRetain(color_space);
}
#endif
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (color_space == NULL && MacOSVersionIsAtLeast(10, 5, 0)) color_space = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
#endif
if (color_space == NULL) color_space = CGColorSpaceCreateDeviceRGB();
if (color_space == NULL) error("Could not get system colour space. You might need to recalibrate your monitor.");
/* Create Core Graphics Context */
free(this->window_buffer);
this->window_buffer = (uint32*)malloc(this->window_width * this->window_height * 4);
CGContextRelease(this->cgcontext);
this->cgcontext = CGBitmapContextCreate(
this->window_buffer, // data
this->window_buffer, // data
this->window_width, // width
this->window_height, // height
8, // bits per component
this->window_width * 4, // bytes per row
QZ_GetCorrectColorSpace(), // color space
color_space, // color space
kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host
);
CGColorSpaceRelease(color_space);
assert(this->cgcontext != NULL);
CGContextSetShouldAntialias(this->cgcontext, FALSE);