From 796d2c9ec8eba12a96dd62b53a55bd17d798bfb8 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 23 Aug 2020 21:53:21 +0200 Subject: [PATCH] (macOS) Disabled unusable command line arguments. --- INSTALL.md | 3 --- es-app/src/main.cpp | 7 ++++--- es-core/src/Settings.cpp | 4 ++-- es-core/src/renderers/Renderer_GL21.cpp | 2 +- es-core/src/renderers/Renderer_GLES10.cpp | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index d23ee298b..7fed12ec2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -788,9 +788,6 @@ You can use `--help` or `-h` to view a list of command line options, as shown he --no-exit Don't show the exit option in the menu --no-splash Don't show the splash screen --debug Print debug information ---windowed Windowed mode, should be combined with --resolution ---fullscreen-normal Normal fullscreen mode ---fullscreen-borderless Borderless fullscreen mode (always on top) --vsync [1/on or 0/off] Turn vsync on or off (default is on) --max-vram [size] Max VRAM to use (in mebibytes) before swapping --gpu-statistics Display framerate and VRAM usage overlay diff --git a/es-app/src/main.cpp b/es-app/src/main.cpp index d271369ea..f991220ce 100644 --- a/es-app/src/main.cpp +++ b/es-app/src/main.cpp @@ -253,8 +253,9 @@ bool parseArgs(int argc, char* argv[]) Settings::getInstance()->setBool("Debug", true); Log::setReportingLevel(LogDebug); } - // Windowed mode is always selected on Windows. - #ifndef _WIN64 + // On Unix, enable settings for the fullscreen mode. + // On macOS and Windows only windowed mode is supported. + #if defined(__unix__) else if (strcmp(argv[i], "--fullscreen-normal") == 0) { Settings::getInstance()->setString("FullscreenMode", "normal"); } @@ -307,7 +308,7 @@ bool parseArgs(int argc, char* argv[]) " --no-exit Don't show the exit option in the menu\n" " --no-splash Don't show the splash screen\n" " --debug Print debug information\n" -#ifndef _WIN64 +#if defined(__unix__) " --windowed Windowed mode, should be combined with --resolution\n" " --fullscreen-normal Normal fullscreen mode\n" " --fullscreen-borderless Borderless fullscreen mode (always on top)\n" diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index 5f91b5403..13a5ad6f9 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -32,7 +32,7 @@ std::vector settings_dont_save { "ShowExit", // --no-exit "SplashScreen", // --no-splash "VSync", // --vsync [1/on or 0/off] - #ifndef _WIN64 + #if !defined(_WIN64) "Windowed", // --windowed #endif "WindowWidth", // Set via --resolution [width] [height] @@ -224,7 +224,7 @@ void Settings::setDefaults() mBoolMap["ShowExit"] = true; mBoolMap["SplashScreen"] = true; mBoolMap["VSync"] = true; - #ifndef _WIN64 + #if !defined(_WIN64) mBoolMap["Windowed"] = false; #endif mIntMap["WindowWidth"] = 0; diff --git a/es-core/src/renderers/Renderer_GL21.cpp b/es-core/src/renderers/Renderer_GL21.cpp index be066bcb8..299e74251 100644 --- a/es-core/src/renderers/Renderer_GL21.cpp +++ b/es-core/src/renderers/Renderer_GL21.cpp @@ -16,7 +16,7 @@ namespace Renderer { - #ifndef NDEBUG + #if !defined(NDEBUG) #define GL_CHECK_ERROR(Function) (Function, _GLCheckError(#Function)) static void _GLCheckError(const char* _funcName) diff --git a/es-core/src/renderers/Renderer_GLES10.cpp b/es-core/src/renderers/Renderer_GLES10.cpp index 7b0c740f3..44d319d78 100644 --- a/es-core/src/renderers/Renderer_GLES10.cpp +++ b/es-core/src/renderers/Renderer_GLES10.cpp @@ -16,7 +16,7 @@ namespace Renderer { - #ifndef NDEBUG + #if !defined(NDEBUG) #define GL_CHECK_ERROR(Function) (Function, _GLCheckError(#Function)) static void _GLCheckError(const char* _funcName)