Merge branch 'master' into jgrpp-beta
# Conflicts: # src/company_cmd.cpp # src/economy.cpp # src/lang/swedish.txt # src/network/network_command.cpp # src/news_gui.cpp # src/saveload/saveload.h # src/script/api/script_list.cpp # src/video/cocoa/cocoa_v.mm # src/video/sdl2_v.cpp
This commit is contained in:
@@ -191,13 +191,13 @@ const char *GetCurrentLocale(const char *)
|
||||
bool GetClipboardContents(char *buffer, const char *last)
|
||||
{
|
||||
NSPasteboard *pb = [ NSPasteboard generalPasteboard ];
|
||||
NSArray *types = [ NSArray arrayWithObject:NSStringPboardType ];
|
||||
NSArray *types = [ NSArray arrayWithObject:NSPasteboardTypeString ];
|
||||
NSString *bestType = [ pb availableTypeFromArray:types ];
|
||||
|
||||
/* Clipboard has no text data available. */
|
||||
if (bestType == nil) return false;
|
||||
|
||||
NSString *string = [ pb stringForType:NSStringPboardType ];
|
||||
NSString *string = [ pb stringForType:NSPasteboardTypeString ];
|
||||
if (string == nil || [ string length ] == 0) return false;
|
||||
|
||||
strecpy(buffer, [ string UTF8String ], last);
|
||||
|
@@ -27,6 +27,10 @@
|
||||
#define HAVE_OSX_1011_SDK
|
||||
#endif
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_10_12
|
||||
#define HAVE_OSX_1012_SDK
|
||||
#endif
|
||||
|
||||
/* It would seem that to ensure backward compatibility we have to ensure that we have defined MAC_OS_X_VERSION_10_x everywhere */
|
||||
#ifndef MAC_OS_X_VERSION_10_3
|
||||
#define MAC_OS_X_VERSION_10_3 1030
|
||||
|
@@ -51,10 +51,10 @@ FT_Error GetFontByFaceName(const char *font_name, FT_Face *face)
|
||||
/* Resolve the name and populate the information structure */
|
||||
pat = FcNameParse((FcChar8 *)font_family);
|
||||
if (font_style != nullptr) FcPatternAddString(pat, FC_STYLE, (FcChar8 *)font_style);
|
||||
FcConfigSubstitute(0, pat, FcMatchPattern);
|
||||
FcConfigSubstitute(nullptr, pat, FcMatchPattern);
|
||||
FcDefaultSubstitute(pat);
|
||||
fs = FcFontSetCreate();
|
||||
match = FcFontMatch(0, pat, &result);
|
||||
match = FcFontMatch(nullptr, pat, &result);
|
||||
|
||||
if (fs != nullptr && match != nullptr) {
|
||||
int i;
|
||||
|
@@ -278,7 +278,7 @@ bool GetClipboardContents(char *buffer, const char *last)
|
||||
}
|
||||
|
||||
char *clip = SDL_GetClipboardText();
|
||||
if (clip != NULL) {
|
||||
if (clip != nullptr) {
|
||||
strecpy(buffer, clip, last);
|
||||
SDL_free(clip);
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user