Merge branch 'master' into jgrpp

# Conflicts:
#	os/macosx/notarize.sh
#	src/3rdparty/CMakeLists.txt
#	src/3rdparty/squirrel/squirrel/sqcompiler.cpp
#	src/3rdparty/squirrel/squirrel/sqdebug.cpp
#	src/3rdparty/squirrel/squirrel/sqvm.cpp
#	src/console_cmds.cpp
#	src/core/span_type.hpp
#	src/crashlog.cpp
#	src/currency.h
#	src/date_gui.cpp
#	src/driver.cpp
#	src/fios.cpp
#	src/genworld_gui.cpp
#	src/hotkeys.cpp
#	src/misc_gui.cpp
#	src/music/os2_m.cpp
#	src/network/core/os_abstraction.h
#	src/network/network_server.cpp
#	src/newgrf.cpp
#	src/newgrf_config.h
#	src/newgrf_text.cpp
#	src/openttd.cpp
#	src/os/macosx/font_osx.cpp
#	src/os/macosx/misc_osx.cpp
#	src/os/os2/CMakeLists.txt
#	src/os/os2/os2.cpp
#	src/os/unix/CMakeLists.txt
#	src/os/windows/font_win32.cpp
#	src/os/windows/win32_main.cpp
#	src/saveload/saveload.cpp
#	src/script/api/script_text.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/stdafx.h
#	src/strings.cpp
#	src/timetable_gui.cpp
#	src/town_gui.cpp
#	src/train_cmd.cpp
#	src/video/dedicated_v.cpp
#	src/video/video_driver.cpp
#	src/video/win32_v.cpp
#	src/viewport.cpp
#	src/waypoint_gui.cpp
#	src/widgets/dropdown_type.h
#	src/window.cpp
#	src/window_gui.h
This commit is contained in:
Jonathan G Rennison
2023-09-12 20:06:47 +01:00
242 changed files with 4733 additions and 6402 deletions

View File

@@ -24,33 +24,6 @@
#include "../window_func.h"
#include "dedicated_v.h"
#ifdef __OS2__
# include <sys/time.h> /* gettimeofday */
# include <sys/types.h>
# include <unistd.h>
# include <conio.h>
# define INCL_DOS
# include <os2.h>
# define STDIN 0 /* file descriptor for standard input */
/**
* Switches OpenTTD to a console app at run-time, instead of a PM app
* Necessary to see stdout, etc.
*/
static void OS2_SwitchToConsoleMode()
{
PPIB pib;
PTIB tib;
DosGetInfoBlocks(&tib, &pib);
/* Change flag from PM to VIO */
pib->pib_ultype = 3;
}
#endif
#if defined(UNIX)
# include <sys/time.h> /* gettimeofday */
# include <sys/types.h>
@@ -160,11 +133,6 @@ const char *VideoDriver_Dedicated::Start(const StringList &parm)
_set_error_mode(_OUT_TO_STDERR);
#endif
#ifdef __OS2__
/* For OS/2 we also need to switch to console mode instead of PM mode */
OS2_SwitchToConsoleMode();
#endif
DEBUG(driver, 1, "Loading dedicated server");
return nullptr;
}
@@ -181,7 +149,7 @@ void VideoDriver_Dedicated::MakeDirty(int left, int top, int width, int height)
bool VideoDriver_Dedicated::ChangeResolution(int w, int h) { return false; }
bool VideoDriver_Dedicated::ToggleFullscreen(bool fs) { return false; }
#if defined(UNIX) || defined(__OS2__)
#if defined(UNIX)
static bool InputWaiting()
{
struct timeval tv;
@@ -214,7 +182,7 @@ static void DedicatedHandleKeyInput()
if (_exit_game) return;
#if defined(UNIX) || defined(__OS2__)
#if defined(UNIX)
if (fgets(input_line, lengthof(input_line), stdin) == nullptr) return;
#else
/* Handle console input, and signal console thread, it can accept input again */