diff options
| author | 2018-01-11 22:41:32 -0700 | |
|---|---|---|
| committer | 2018-01-12 19:11:05 -0700 | |
| commit | 70e65ee63a08c4f0716872a45faffade0e18e369 (patch) | |
| tree | 78f1ec5e39992cf581ca328027b7c8c8259e1bb9 /src | |
| parent | Removing unused settings and yuzu rebranding (diff) | |
| download | yuzu-70e65ee63a08c4f0716872a45faffade0e18e369.tar.gz yuzu-70e65ee63a08c4f0716872a45faffade0e18e369.tar.xz yuzu-70e65ee63a08c4f0716872a45faffade0e18e369.zip | |
Remove settings issues in sdl and fix a few files that broke in mingw
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/service.cpp | 2 | ||||
| -rw-r--r-- | src/core/perf_stats.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 47 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 2 |
4 files changed, 1 insertions, 53 deletions
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 389243035..d2265227f 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -17,8 +17,6 @@ | |||
| 17 | #include "core/hle/service/am/am.h" | 17 | #include "core/hle/service/am/am.h" |
| 18 | #include "core/hle/service/aoc/aoc_u.h" | 18 | #include "core/hle/service/aoc/aoc_u.h" |
| 19 | #include "core/hle/service/apm/apm.h" | 19 | #include "core/hle/service/apm/apm.h" |
| 20 | #include "core/hle/service/dsp_dsp.h" | ||
| 21 | #include "core/hle/service/gsp_gpu.h" | ||
| 22 | #include "core/hle/service/hid/hid.h" | 20 | #include "core/hle/service/hid/hid.h" |
| 23 | #include "core/hle/service/lm/lm.h" | 21 | #include "core/hle/service/lm/lm.h" |
| 24 | #include "core/hle/service/nvdrv/nvdrv.h" | 22 | #include "core/hle/service/nvdrv/nvdrv.h" |
diff --git a/src/core/perf_stats.cpp b/src/core/perf_stats.cpp index 2cdfb9ded..26752699e 100644 --- a/src/core/perf_stats.cpp +++ b/src/core/perf_stats.cpp | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | #include <mutex> | 6 | #include <mutex> |
| 7 | #include <thread> | 7 | #include <thread> |
| 8 | #include "common/math_util.h" | 8 | #include "common/math_util.h" |
| 9 | #include "core/hw/gpu.h" | ||
| 10 | #include "core/perf_stats.h" | 9 | #include "core/perf_stats.h" |
| 11 | #include "core/settings.h" | 10 | #include "core/settings.h" |
| 12 | 11 | ||
| @@ -70,7 +69,7 @@ PerfStats::Results PerfStats::GetAndResetStats(u64 current_system_time_us) { | |||
| 70 | double PerfStats::GetLastFrameTimeScale() { | 69 | double PerfStats::GetLastFrameTimeScale() { |
| 71 | std::lock_guard<std::mutex> lock(object_mutex); | 70 | std::lock_guard<std::mutex> lock(object_mutex); |
| 72 | 71 | ||
| 73 | constexpr double FRAME_LENGTH = 1.0 / GPU::SCREEN_REFRESH_RATE; | 72 | constexpr double FRAME_LENGTH = 1.0 / 60; // GPU::SCREEN_REFRESH_RATE; |
| 74 | return duration_cast<DoubleSecs>(previous_frame_length).count() / FRAME_LENGTH; | 73 | return duration_cast<DoubleSecs>(previous_frame_length).count() / FRAME_LENGTH; |
| 75 | } | 74 | } |
| 76 | 75 | ||
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index eee3f5c5e..df94ce839 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #include "yuzu_cmd/config.h" | 13 | #include "yuzu_cmd/config.h" |
| 14 | #include "yuzu_cmd/default_ini.h" | 14 | #include "yuzu_cmd/default_ini.h" |
| 15 | 15 | ||
| 16 | |||
| 17 | Config::Config() { | 16 | Config::Config() { |
| 18 | // TODO: Don't hardcode the path; let the frontend decide where to put the config files. | 17 | // TODO: Don't hardcode the path; let the frontend decide where to put the config files. |
| 19 | sdl2_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "sdl2-config.ini"; | 18 | sdl2_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "sdl2-config.ini"; |
| @@ -87,11 +86,8 @@ void Config::ReadValues() { | |||
| 87 | static_cast<Settings::CpuCore>(sdl2_config->GetInteger("Core", "cpu_core", 0)); | 86 | static_cast<Settings::CpuCore>(sdl2_config->GetInteger("Core", "cpu_core", 0)); |
| 88 | 87 | ||
| 89 | // Renderer | 88 | // Renderer |
| 90 | Settings::values.use_hw_renderer = sdl2_config->GetBoolean("Renderer", "use_hw_renderer", true); | ||
| 91 | Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true); | ||
| 92 | Settings::values.resolution_factor = | 89 | Settings::values.resolution_factor = |
| 93 | (float)sdl2_config->GetReal("Renderer", "resolution_factor", 1.0); | 90 | (float)sdl2_config->GetReal("Renderer", "resolution_factor", 1.0); |
| 94 | Settings::values.use_vsync = sdl2_config->GetBoolean("Renderer", "use_vsync", false); | ||
| 95 | Settings::values.toggle_framelimit = | 91 | Settings::values.toggle_framelimit = |
| 96 | sdl2_config->GetBoolean("Renderer", "toggle_framelimit", true); | 92 | sdl2_config->GetBoolean("Renderer", "toggle_framelimit", true); |
| 97 | 93 | ||
| @@ -99,43 +95,10 @@ void Config::ReadValues() { | |||
| 99 | Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 0.0); | 95 | Settings::values.bg_green = (float)sdl2_config->GetReal("Renderer", "bg_green", 0.0); |
| 100 | Settings::values.bg_blue = (float)sdl2_config->GetReal("Renderer", "bg_blue", 0.0); | 96 | Settings::values.bg_blue = (float)sdl2_config->GetReal("Renderer", "bg_blue", 0.0); |
| 101 | 97 | ||
| 102 | // Layout | ||
| 103 | Settings::values.layout_option = | ||
| 104 | static_cast<Settings::LayoutOption>(sdl2_config->GetInteger("Layout", "layout_option", 0)); | ||
| 105 | Settings::values.swap_screen = sdl2_config->GetBoolean("Layout", "swap_screen", false); | ||
| 106 | Settings::values.custom_layout = sdl2_config->GetBoolean("Layout", "custom_layout", false); | ||
| 107 | Settings::values.custom_top_left = | ||
| 108 | static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_top_left", 0)); | ||
| 109 | Settings::values.custom_top_top = | ||
| 110 | static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_top_top", 0)); | ||
| 111 | Settings::values.custom_top_right = | ||
| 112 | static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_top_right", 400)); | ||
| 113 | Settings::values.custom_top_bottom = | ||
| 114 | static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_top_bottom", 240)); | ||
| 115 | Settings::values.custom_bottom_left = | ||
| 116 | static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_left", 40)); | ||
| 117 | Settings::values.custom_bottom_top = | ||
| 118 | static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_top", 240)); | ||
| 119 | Settings::values.custom_bottom_right = | ||
| 120 | static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_right", 360)); | ||
| 121 | Settings::values.custom_bottom_bottom = | ||
| 122 | static_cast<u16>(sdl2_config->GetInteger("Layout", "custom_bottom_bottom", 480)); | ||
| 123 | |||
| 124 | // Audio | ||
| 125 | Settings::values.sink_id = sdl2_config->Get("Audio", "output_engine", "auto"); | ||
| 126 | Settings::values.enable_audio_stretching = | ||
| 127 | sdl2_config->GetBoolean("Audio", "enable_audio_stretching", true); | ||
| 128 | Settings::values.audio_device_id = sdl2_config->Get("Audio", "output_device", "auto"); | ||
| 129 | |||
| 130 | // Data Storage | 98 | // Data Storage |
| 131 | Settings::values.use_virtual_sd = | 99 | Settings::values.use_virtual_sd = |
| 132 | sdl2_config->GetBoolean("Data Storage", "use_virtual_sd", true); | 100 | sdl2_config->GetBoolean("Data Storage", "use_virtual_sd", true); |
| 133 | 101 | ||
| 134 | // System | ||
| 135 | Settings::values.is_new_3ds = sdl2_config->GetBoolean("System", "is_new_3ds", false); | ||
| 136 | Settings::values.region_value = | ||
| 137 | sdl2_config->GetInteger("System", "region_value", Settings::REGION_VALUE_AUTO_SELECT); | ||
| 138 | |||
| 139 | // Miscellaneous | 102 | // Miscellaneous |
| 140 | Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Info"); | 103 | Settings::values.log_filter = sdl2_config->Get("Miscellaneous", "log_filter", "*:Info"); |
| 141 | 104 | ||
| @@ -143,16 +106,6 @@ void Config::ReadValues() { | |||
| 143 | Settings::values.use_gdbstub = sdl2_config->GetBoolean("Debugging", "use_gdbstub", false); | 106 | Settings::values.use_gdbstub = sdl2_config->GetBoolean("Debugging", "use_gdbstub", false); |
| 144 | Settings::values.gdbstub_port = | 107 | Settings::values.gdbstub_port = |
| 145 | static_cast<u16>(sdl2_config->GetInteger("Debugging", "gdbstub_port", 24689)); | 108 | static_cast<u16>(sdl2_config->GetInteger("Debugging", "gdbstub_port", 24689)); |
| 146 | |||
| 147 | // Web Service | ||
| 148 | Settings::values.enable_telemetry = | ||
| 149 | sdl2_config->GetBoolean("WebService", "enable_telemetry", true); | ||
| 150 | Settings::values.telemetry_endpoint_url = sdl2_config->Get( | ||
| 151 | "WebService", "telemetry_endpoint_url", "https://services.citra-emu.org/api/telemetry"); | ||
| 152 | Settings::values.verify_endpoint_url = sdl2_config->Get( | ||
| 153 | "WebService", "verify_endpoint_url", "https://services.citra-emu.org/api/profile"); | ||
| 154 | Settings::values.citra_username = sdl2_config->Get("WebService", "citra_username", ""); | ||
| 155 | Settings::values.citra_token = sdl2_config->Get("WebService", "citra_token", ""); | ||
| 156 | } | 109 | } |
| 157 | 110 | ||
| 158 | void Config::Reload() { | 111 | void Config::Reload() { |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 7cbffba52..3d7cd06a4 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -17,7 +17,6 @@ | |||
| 17 | #include "input_common/motion_emu.h" | 17 | #include "input_common/motion_emu.h" |
| 18 | #include "yuzu_cmd/emu_window/emu_window_sdl2.h" | 18 | #include "yuzu_cmd/emu_window/emu_window_sdl2.h" |
| 19 | 19 | ||
| 20 | |||
| 21 | void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) { | 20 | void EmuWindow_SDL2::OnMouseMotion(s32 x, s32 y) { |
| 22 | TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); | 21 | TouchMoved((unsigned)std::max(x, 0), (unsigned)std::max(y, 0)); |
| 23 | InputCommon::GetMotionEmu()->Tilt(x, y); | 22 | InputCommon::GetMotionEmu()->Tilt(x, y); |
| @@ -106,7 +105,6 @@ EmuWindow_SDL2::EmuWindow_SDL2() { | |||
| 106 | OnResize(); | 105 | OnResize(); |
| 107 | OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); | 106 | OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size); |
| 108 | SDL_PumpEvents(); | 107 | SDL_PumpEvents(); |
| 109 | SDL_GL_SetSwapInterval(Settings::values.use_vsync); | ||
| 110 | 108 | ||
| 111 | DoneCurrent(); | 109 | DoneCurrent(); |
| 112 | } | 110 | } |