Преглед изворни кода

Merge branch 'main' into viewport-clamp

Alexis Maiquez пре 2 година
родитељ
комит
13ba153042
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      src/WallpaperEngine/Application/CApplicationContext.cpp

+ 4 - 1
src/WallpaperEngine/Application/CApplicationContext.cpp

@@ -3,6 +3,7 @@
 #include "Steam/FileSystem/FileSystem.h"
 #include "WallpaperEngine/Logging/CLog.h"
 
+#include <cstdlib>
 #include <cstring>
 #include <getopt.h>
 
@@ -190,6 +191,7 @@ CApplicationContext::CApplicationContext (int argc, char* argv[])
 
             case 'h':
                 printHelp (argv[0]);
+		std::exit(0);
                 break;
 
             case 'f':
@@ -268,6 +270,7 @@ CApplicationContext::CApplicationContext (int argc, char* argv[])
         else
         {
             printHelp (argv[0]);
+	    std::exit(0);
         }
     }
 
@@ -353,4 +356,4 @@ void CApplicationContext::printHelp (const char* route)
                     \t\t For default wallpaper last specified value will be used.\n\
                     \t\t Example: ./wallengine --scaling stretch --screen-root eDP-1 --bg 2667198601 --scaling fill --screen-root eDP-2 2667198602");
     sLog.out ("\t--clamping <mode>\t Clamping mode for all wallpapers. Can be clamp, border, repeat. Enables GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER, GL_REPEAT accordingly. Default is clamp.");
-}
+}