Merge branch 'master' into jgrpp
# Conflicts: # projects/openttd_vs140.vcxproj.filters # projects/openttd_vs141.vcxproj.filters # projects/openttd_vs142.vcxproj.filters # src/base_consist.h # src/company_base.h # src/newgrf_config.cpp # src/newgrf_config.h # src/openttd.cpp # src/saveload/saveload.cpp # src/saveload/saveload.h # src/saveload/station_sl.cpp # src/settings.cpp # src/signs_base.h # src/string.cpp # src/string_func.h # src/table/misc_settings.ini # src/table/settings.h.preamble # src/town_cmd.cpp # src/vehicle.cpp # src/vehicle_cmd.cpp # src/video/cocoa/cocoa_v.mm # src/video/null_v.cpp
This commit is contained in:
@@ -410,7 +410,7 @@ static void PollEvent()
|
||||
*/
|
||||
int _allegro_instance_count = 0;
|
||||
|
||||
const char *VideoDriver_Allegro::Start(const char * const *parm)
|
||||
const char *VideoDriver_Allegro::Start(const StringList &parm)
|
||||
{
|
||||
if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, nullptr)) {
|
||||
DEBUG(driver, 0, "allegro: install_allegro failed '%s'", allegro_error);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/** The allegro video driver. */
|
||||
class VideoDriver_Allegro : public VideoDriver {
|
||||
public:
|
||||
const char *Start(const char * const *param) override;
|
||||
const char *Start(const StringList ¶m) override;
|
||||
|
||||
void Stop() override;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
class VideoDriver_Cocoa : public VideoDriver {
|
||||
public:
|
||||
const char *Start(const char * const *param) override;
|
||||
const char *Start(const StringList ¶m) override;
|
||||
|
||||
/** Stop the video driver */
|
||||
void Stop() override;
|
||||
|
||||
@@ -396,7 +396,7 @@ void VideoDriver_Cocoa::Stop()
|
||||
/**
|
||||
* Initialize a cocoa video subdriver.
|
||||
*/
|
||||
const char *VideoDriver_Cocoa::Start(const char * const *parm)
|
||||
const char *VideoDriver_Cocoa::Start(const StringList &parm)
|
||||
{
|
||||
if (!MacOSVersionIsAtLeast(10, 6, 0)) return "The Cocoa video driver requires Mac OS X 10.6 or later.";
|
||||
|
||||
@@ -520,7 +520,7 @@ void CocoaDialog(const char *title, const char *message, const char *buttonLabel
|
||||
bool wasstarted = _cocoa_video_started;
|
||||
if (VideoDriver::GetInstance() == nullptr) {
|
||||
setupApplication(); // Setup application before showing dialog
|
||||
} else if (!_cocoa_video_started && VideoDriver::GetInstance()->Start(nullptr) != nullptr) {
|
||||
} else if (!_cocoa_video_started && VideoDriver::GetInstance()->Start(StringList()) != NULL) {
|
||||
fprintf(stderr, "%s: %s\n", title, message);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ extern bool SafeLoad(const char *filename, SaveLoadOperation fop, DetailedFileTy
|
||||
static FVideoDriver_Dedicated iFVideoDriver_Dedicated;
|
||||
|
||||
|
||||
const char *VideoDriver_Dedicated::Start(const char * const *parm)
|
||||
const char *VideoDriver_Dedicated::Start(const StringList &parm)
|
||||
{
|
||||
int bpp = BlitterFactory::GetCurrentBlitter()->GetScreenDepth();
|
||||
_dedicated_video_mem = (bpp == 0) ? nullptr : MallocT<byte>(_cur_resolution.width * _cur_resolution.height * (bpp / 8));
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/** The dedicated server video driver. */
|
||||
class VideoDriver_Dedicated : public VideoDriver {
|
||||
public:
|
||||
const char *Start(const char * const *param) override;
|
||||
const char *Start(const StringList ¶m) override;
|
||||
|
||||
void Stop() override;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ static FVideoDriver_Null iFVideoDriver_Null;
|
||||
|
||||
extern bool _exit_game;
|
||||
|
||||
const char *VideoDriver_Null::Start(const char * const *parm)
|
||||
const char *VideoDriver_Null::Start(const StringList &parm)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
/* Disable the MSVC assertion message box. */
|
||||
|
||||
@@ -19,7 +19,7 @@ private:
|
||||
bool until_exit;
|
||||
|
||||
public:
|
||||
const char *Start(const char * const *param) override;
|
||||
const char *Start(const StringList ¶m) override;
|
||||
|
||||
void Stop() override;
|
||||
|
||||
|
||||
@@ -942,7 +942,7 @@ int VideoDriver_SDL::PollEvent()
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char *VideoDriver_SDL::Start(const char * const *parm)
|
||||
const char *VideoDriver_SDL::Start(const StringList &parm)
|
||||
{
|
||||
#if defined(WITH_FCITX)
|
||||
FcitxInit();
|
||||
@@ -972,7 +972,7 @@ const char *VideoDriver_SDL::Start(const char * const *parm)
|
||||
|
||||
MarkWholeScreenDirty();
|
||||
|
||||
_draw_threaded = GetDriverParam(parm, "no_threads") == nullptr && GetDriverParam(parm, "no_thread") == nullptr;
|
||||
_draw_threaded = !GetDriverParamBool(parm, "no_threads") && !GetDriverParamBool(parm, "no_thread");
|
||||
|
||||
SDL_StopTextInput();
|
||||
this->edit_box_focused = false;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/** The SDL video driver. */
|
||||
class VideoDriver_SDL : public VideoDriver {
|
||||
public:
|
||||
const char *Start(const char * const *param) override;
|
||||
const char *Start(const StringList ¶m) override;
|
||||
|
||||
void Stop() override;
|
||||
|
||||
|
||||
@@ -600,7 +600,7 @@ int VideoDriver_SDL::PollEvent()
|
||||
return -1;
|
||||
}
|
||||
|
||||
const char *VideoDriver_SDL::Start(const char * const *parm)
|
||||
const char *VideoDriver_SDL::Start(const StringList &parm)
|
||||
{
|
||||
char buf[30];
|
||||
_use_hwpalette = GetDriverParamInt(parm, "hw_palette", 2);
|
||||
@@ -627,7 +627,7 @@ const char *VideoDriver_SDL::Start(const char * const *parm)
|
||||
MarkWholeScreenDirty();
|
||||
SetupKeyboard();
|
||||
|
||||
_draw_threaded = GetDriverParam(parm, "no_threads") == nullptr && GetDriverParam(parm, "no_thread") == nullptr;
|
||||
_draw_threaded = !GetDriverParamBool(parm, "no_threads") && !GetDriverParamBool(parm, "no_thread");
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/** The SDL video driver. */
|
||||
class VideoDriver_SDL : public VideoDriver {
|
||||
public:
|
||||
const char *Start(const char * const *param) override;
|
||||
const char *Start(const StringList ¶m) override;
|
||||
|
||||
void Stop() override;
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
extern char *_ini_videodriver;
|
||||
extern std::string _ini_videodriver;
|
||||
extern std::vector<Dimension> _resolutions;
|
||||
extern Dimension _cur_resolution;
|
||||
extern bool _rightclick_emulate;
|
||||
|
||||
@@ -1115,7 +1115,7 @@ static void FindResolutions()
|
||||
|
||||
static FVideoDriver_Win32 iFVideoDriver_Win32;
|
||||
|
||||
const char *VideoDriver_Win32::Start(const char * const *parm)
|
||||
const char *VideoDriver_Win32::Start(const StringList &parm)
|
||||
{
|
||||
memset(&_wnd, 0, sizeof(_wnd));
|
||||
|
||||
@@ -1136,7 +1136,7 @@ const char *VideoDriver_Win32::Start(const char * const *parm)
|
||||
|
||||
MarkWholeScreenDirty();
|
||||
|
||||
_draw_threaded = GetDriverParam(parm, "no_threads") == nullptr && GetDriverParam(parm, "no_thread") == nullptr && std::thread::hardware_concurrency() > 1;
|
||||
_draw_threaded = !GetDriverParamBool(parm, "no_threads") && !GetDriverParamBool(parm, "no_thread") && std::thread::hardware_concurrency() > 1;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/** The video driver for windows. */
|
||||
class VideoDriver_Win32 : public VideoDriver {
|
||||
public:
|
||||
const char *Start(const char * const *param) override;
|
||||
const char *Start(const StringList ¶m) override;
|
||||
|
||||
void Stop() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user