mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-02 13:01:18 +12:00
"verbose" command line argument to log to stdout
This commit is contained in:
parent
c8045f7f04
commit
84aee3906b
3 changed files with 14 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "util/helpers/helpers.h"
|
||||
#include "config/CemuConfig.h"
|
||||
#include "config/ActiveSettings.h"
|
||||
#include "config/LaunchSettings.h"
|
||||
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
|
@ -144,6 +145,9 @@ bool cemuLog_log(LogType type, std::string_view text)
|
|||
if (!cemuLog_isLoggingEnabled(type))
|
||||
return false;
|
||||
|
||||
if (LaunchSettings::Verbose())
|
||||
std::cout << text << std::endl;
|
||||
|
||||
cemuLog_writeLineToLog(text);
|
||||
|
||||
const auto it = std::find_if(g_logging_window_mapping.cbegin(), g_logging_window_mapping.cend(),
|
||||
|
|
|
@ -59,6 +59,9 @@ bool LaunchSettings::HandleCommandline(const std::vector<std::wstring>& args)
|
|||
desc.add_options()
|
||||
("help,h", "This help screen")
|
||||
("version,v", "Displays the version of Cemu")
|
||||
#if !BOOST_OS_WINDOWS
|
||||
("verbose", "Log to stdout")
|
||||
#endif
|
||||
|
||||
("game,g", po::wvalue<std::wstring>(), "Path of game to launch")
|
||||
("title-id,t", po::value<std::string>(), "Title ID of the title to be launched (overridden by --game)")
|
||||
|
@ -125,6 +128,9 @@ bool LaunchSettings::HandleCommandline(const std::vector<std::wstring>& args)
|
|||
return false; // exit in main
|
||||
}
|
||||
|
||||
if (vm.count("verbose"))
|
||||
s_verbose = true;
|
||||
|
||||
if (vm.count("game"))
|
||||
{
|
||||
std::wstring tmp = vm["game"].as<std::wstring>();
|
||||
|
|
|
@ -22,6 +22,8 @@ public:
|
|||
static std::optional<bool> RenderUpsideDownEnabled() { return s_render_upside_down; }
|
||||
static std::optional<bool> FullscreenEnabled() { return s_fullscreen; }
|
||||
|
||||
static bool Verbose() { return s_verbose; }
|
||||
|
||||
static bool GDBStubEnabled() { return s_enable_gdbstub; }
|
||||
static bool NSightModeEnabled() { return s_nsight_mode; }
|
||||
|
||||
|
@ -40,6 +42,8 @@ private:
|
|||
|
||||
inline static std::optional<bool> s_render_upside_down{};
|
||||
inline static std::optional<bool> s_fullscreen{};
|
||||
|
||||
inline static bool s_verbose = false;
|
||||
|
||||
inline static bool s_enable_gdbstub = false;
|
||||
inline static bool s_nsight_mode = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue