diff options
Diffstat (limited to '')
-rw-r--r-- | src/yuzu_cmd/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/yuzu_cmd/config.cpp | 16 | ||||
-rw-r--r-- | src/yuzu_cmd/default_ini.h | 6 | ||||
-rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 11 | ||||
-rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.h | 2 | ||||
-rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp | 12 | ||||
-rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp | 10 | ||||
-rw-r--r-- | src/yuzu_cmd/resource.h | 16 | ||||
-rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 10 |
9 files changed, 58 insertions, 26 deletions
diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt index 8461f8896..4bf25727b 100644 --- a/src/yuzu_cmd/CMakeLists.txt +++ b/src/yuzu_cmd/CMakeLists.txt @@ -20,7 +20,6 @@ add_executable(yuzu-cmd emu_window/emu_window_sdl2_gl.h emu_window/emu_window_sdl2_vk.cpp emu_window/emu_window_sdl2_vk.h - resource.h yuzu.cpp yuzu.rc ) diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 43877fc98..7e1d5f379 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -4,13 +4,23 @@ #include <memory> #include <sstream> + +// Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307 +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wimplicit-fallthrough" +#endif #include <SDL.h> +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #include <inih/cpp/INIReader.h> #include "common/file_util.h" #include "common/logging/log.h" #include "common/param_package.h" +#include "common/settings.h" #include "core/hle/service/acc/profile_manager.h" -#include "core/settings.h" #include "input_common/main.h" #include "input_common/udp/client.h" #include "yuzu_cmd/config.h" @@ -428,6 +438,10 @@ void Config::ReadValues() { Settings::values.reporting_services = sdl2_config->GetBoolean("Debugging", "reporting_services", false); Settings::values.quest_flag = sdl2_config->GetBoolean("Debugging", "quest_flag", false); + Settings::values.use_debug_asserts = + sdl2_config->GetBoolean("Debugging", "use_debug_asserts", false); + Settings::values.use_auto_stub = sdl2_config->GetBoolean("Debugging", "use_auto_stub", false); + Settings::values.disable_macro_jit = sdl2_config->GetBoolean("Debugging", "disable_macro_jit", false); diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 3ee0e037d..4ce8e08e4 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -325,6 +325,12 @@ dump_nso=false # Determines whether or not yuzu will report to the game that the emulated console is in Kiosk Mode # false: Retail/Normal Mode (default), true: Kiosk Mode quest_flag = +# Determines whether debug asserts should be enabled, which will throw an exception on asserts. +# false: Disabled (default), true: Enabled +use_debug_asserts = +# Determines whether unimplemented HLE service calls should be automatically stubbed. +# false: Disabled (default), true: Enabled +use_auto_stub = # Enables/Disables the macro JIT compiler disable_macro_jit=false diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index ce8b7c218..d64f81106 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp @@ -2,7 +2,16 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +// Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307 +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wimplicit-fallthrough" +#endif #include <SDL.h> +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #include "common/logging/log.h" #include "common/scm_rev.h" #include "core/core.h" @@ -229,6 +238,6 @@ void EmuWindow_SDL2::SetWindowIcon() { SDL_FreeSurface(window_icon); } -void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest(std::pair<unsigned, unsigned> minimal_size) { +void EmuWindow_SDL2::OnMinimalClientAreaChangeRequest(std::pair<u32, u32> minimal_size) { SDL_SetWindowMinimumSize(render_window, minimal_size.first, minimal_size.second); } diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.h b/src/yuzu_cmd/emu_window/emu_window_sdl2.h index 0e17bbca7..1b9ab5b93 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.h +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.h @@ -71,7 +71,7 @@ protected: void Fullscreen(); /// Called when a configuration change affects the minimal size of the window - void OnMinimalClientAreaChangeRequest(std::pair<unsigned, unsigned> minimal_size) override; + void OnMinimalClientAreaChangeRequest(std::pair<u32, u32> minimal_size) override; /// Is the window still open? bool is_open = true; diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp index a02485c14..3c49a300b 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp @@ -5,16 +5,26 @@ #include <algorithm> #include <cstdlib> #include <string> + #define SDL_MAIN_HANDLED +// Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307 +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wimplicit-fallthrough" +#endif #include <SDL.h> +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + #include <fmt/format.h> #include <glad/glad.h> #include "common/assert.h" #include "common/logging/log.h" #include "common/scm_rev.h" +#include "common/settings.h" #include "common/string_util.h" #include "core/core.h" -#include "core/settings.h" #include "input_common/keyboard.h" #include "input_common/main.h" #include "video_core/renderer_base.h" diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp index 6f9b00461..3401ad4b4 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp @@ -11,12 +11,20 @@ #include "common/assert.h" #include "common/logging/log.h" #include "common/scm_rev.h" -#include "core/settings.h" +#include "common/settings.h" #include "video_core/renderer_vulkan/renderer_vulkan.h" #include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h" // Include these late to avoid polluting everything with Xlib macros +// Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307 +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wimplicit-fallthrough" +#endif #include <SDL.h> +#ifdef __clang__ +#pragma clang diagnostic pop +#endif #include <SDL_syswm.h> EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsystem) diff --git a/src/yuzu_cmd/resource.h b/src/yuzu_cmd/resource.h deleted file mode 100644 index df8e459e4..000000000 --- a/src/yuzu_cmd/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by pcafe.rc -// -#define IDI_ICON3 103 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 105 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 982c41785..4871ac3bb 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -20,6 +20,7 @@ #include "common/nvidia_flags.h" #include "common/scm_rev.h" #include "common/scope_exit.h" +#include "common/settings.h" #include "common/string_util.h" #include "common/telemetry.h" #include "core/core.h" @@ -29,7 +30,6 @@ #include "core/hle/kernel/process.h" #include "core/hle/service/filesystem/filesystem.h" #include "core/loader/loader.h" -#include "core/settings.h" #include "core/telemetry_session.h" #include "input_common/main.h" #include "video_core/renderer_base.h" @@ -74,14 +74,16 @@ static void PrintVersion() { } static void InitializeLogging() { + using namespace Common; + Log::Filter log_filter(Log::Level::Debug); log_filter.ParseFilterString(Settings::values.log_filter); Log::SetGlobalFilter(log_filter); Log::AddBackend(std::make_unique<Log::ColorConsoleBackend>()); - const std::string& log_dir = Common::FS::GetUserPath(Common::FS::UserPath::LogDir); - Common::FS::CreateFullPath(log_dir); + const std::string& log_dir = FS::GetUserPath(FS::UserPath::LogDir); + FS::CreateFullPath(log_dir); Log::AddBackend(std::make_unique<Log::FileBackend>(log_dir + LOG_FILE)); #ifdef _WIN32 Log::AddBackend(std::make_unique<Log::DebuggerBackend>()); @@ -164,7 +166,7 @@ int main(int argc, char** argv) { InputCommon::InputSubsystem input_subsystem; // Apply the command line arguments - Settings::Apply(system); + system.ApplySettings(); std::unique_ptr<EmuWindow_SDL2> emu_window; switch (Settings::values.renderer_backend.GetValue()) { |