Merge 1.9.0-beta2

This commit is contained in:
Pavel Stupnikov
2019-02-14 00:47:22 +03:00
1364 changed files with 22213 additions and 10721 deletions
+7 -4
View File
@@ -1,4 +1,4 @@
/* $Id: sdl_v.cpp 27775 2017-03-11 13:05:54Z frosch $ */
/* $Id$ */
/*
* This file is part of OpenTTD.
@@ -23,6 +23,7 @@
#include "../core/random_func.hpp"
#include "../core/math_func.hpp"
#include "../fileio_func.h"
#include "../framerate_type.h"
#include "sdl_v.h"
#include <SDL.h>
@@ -148,6 +149,8 @@ static void CheckPaletteAnim()
static void DrawSurfaceToScreen()
{
PerformanceMeasurer framerate(PFE_VIDEO);
int n = _num_dirty_rects;
if (n == 0) return;
@@ -261,7 +264,7 @@ static void GetAvailableVideoMode(uint *w, uint *h)
*h = _resolutions[best].height;
}
#ifdef WIN32
#ifdef _WIN32
/* Let's redefine the LoadBMP macro with because we are dynamically
* loading SDL and need to 'SDL_CALL' all functions */
#undef SDL_LoadBMP
@@ -323,7 +326,7 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h)
want_hwpalette = _use_hwpalette;
}
if (want_hwpalette) DEBUG(driver, 1, "SDL: requesting hardware palete");
if (want_hwpalette) DEBUG(driver, 1, "SDL: requesting hardware palette");
/* Free any previously allocated shadow surface */
if (_sdl_screen != NULL && _sdl_screen != _sdl_realscreen) SDL_CALL SDL_FreeSurface(_sdl_screen);
@@ -505,7 +508,7 @@ static uint ConvertSdlKeyIntoMy(SDL_keysym *sym, WChar *character)
}
/* check scancode for BACKQUOTE key, because we want the key left of "1", not anything else (on non-US keyboards) */
#if defined(WIN32) || defined(__OS2__)
#if defined(_WIN32) || defined(__OS2__)
if (sym->scancode == 41) key = WKC_BACKQUOTE;
#elif defined(__APPLE__)
if (sym->scancode == 10) key = WKC_BACKQUOTE;