1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

Remove --console CLI switch

This commit is contained in:
Ted John
2017-01-09 22:28:28 +00:00
parent 1b21a308cd
commit d535e290d3
4 changed files with 0 additions and 47 deletions

View File

@@ -39,10 +39,6 @@ extern "C"
#define IMPLIES_SILENT_BREAKPAD
#endif // USE_BREAKPAD
#if defined(__WINDOWS__) && !defined(DEBUG)
#define __PROVIDE_CONSOLE__ 1
#endif // defined(__WINDOWS__) && !defined(DEBUG)
#ifndef DISABLE_NETWORK
int gNetworkStart = NETWORK_MODE_NONE;
char gNetworkStartHost[128];
@@ -51,10 +47,6 @@ int gNetworkStartPort = NETWORK_DEFAULT_PORT;
static uint32 _port = 0;
#endif
#ifdef __PROVIDE_CONSOLE__
static bool _provideConsole;
#endif
static bool _help = false;
static bool _version = false;
static bool _noInstall = false;
@@ -77,9 +69,6 @@ static const CommandLineOptionDefinition StandardOptions[]
{ CMDLINE_TYPE_SWITCH, &_about, NAC, "about", "show information about " OPENRCT2_NAME },
{ CMDLINE_TYPE_SWITCH, &_verbose, NAC, "verbose", "log verbose messages" },
{ CMDLINE_TYPE_SWITCH, &_headless, NAC, "headless", "run " OPENRCT2_NAME " headless" IMPLIES_SILENT_BREAKPAD },
#ifdef __PROVIDE_CONSOLE__
{ CMDLINE_TYPE_SWITCH, &_provideConsole, NAC, "console", "creates a new or attaches to an existing console window for standard output" },
#endif
#ifndef DISABLE_NETWORK
{ CMDLINE_TYPE_INTEGER, &_port, NAC, "port", "port to use for hosting or joining a server" },
#endif
@@ -166,13 +155,6 @@ exitcode_t CommandLine::HandleCommandDefault()
{
exitcode_t result = EXITCODE_CONTINUE;
#ifdef __PROVIDE_CONSOLE__
if (_provideConsole)
{
platform_windows_open_console();
}
#endif
if (_about)
{
PrintAbout();

View File

@@ -220,8 +220,6 @@ void core_init();
#include <windows.h>
#undef GetMessage
void platform_windows_open_console();
void platform_windows_close_console();
int windows_get_registry_install_info(rct2_install_info *installInfo, char *source, char *font, uint8 charset);
HWND windows_get_window_handle();
void platform_setup_file_associations();

View File

@@ -643,10 +643,6 @@ void platform_free()
platform_close_window();
SDL_Quit();
#ifdef __WINDOWS__
platform_windows_close_console();
#endif
}
void platform_start_text_input(utf8* buffer, int max_length)

View File

@@ -47,7 +47,6 @@
static utf8 _userDataDirectoryPath[MAX_PATH] = { 0 };
static utf8 _openrctDataDirectoryPath[MAX_PATH] = { 0 };
static bool _consoleIsAttached = false;
utf8 **windows_get_command_line_args(int *outNumArgs);
@@ -125,28 +124,6 @@ __declspec(dllexport) int StartOpenRCT(HINSTANCE hInstance, HINSTANCE hPrevInsta
#endif // NO_RCT2
void platform_windows_open_console()
{
if (!AttachConsole(ATTACH_PARENT_PROCESS)) {
if (!AllocConsole()) {
return;
}
}
freopen("CONIN$", "r", stdin);
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
_consoleIsAttached = true;
}
void platform_windows_close_console()
{
if (_consoleIsAttached) {
_consoleIsAttached = false;
FreeConsole();
}
}
utf8 **windows_get_command_line_args(int *outNumArgs)
{
int argc;