mirror of
https://github.com/citra-mirror/citra.git
synced 2024-08-20 18:33:24 +02:00
Merge pull request #4579 from xperia64/3d_slider
Change 3D Slider in-game
This commit is contained in:
commit
054a97c08b
@ -438,7 +438,7 @@ void Config::SaveValues() {
|
|||||||
|
|
||||||
qt_config->beginGroup("Layout");
|
qt_config->beginGroup("Layout");
|
||||||
WriteSetting("toggle_3d", Settings::values.toggle_3d, false);
|
WriteSetting("toggle_3d", Settings::values.toggle_3d, false);
|
||||||
WriteSetting("factor_3d", Settings::values.factor_3d, 0);
|
WriteSetting("factor_3d", Settings::values.factor_3d.load(), 0);
|
||||||
WriteSetting("layout_option", static_cast<int>(Settings::values.layout_option));
|
WriteSetting("layout_option", static_cast<int>(Settings::values.layout_option));
|
||||||
WriteSetting("swap_screen", Settings::values.swap_screen, false);
|
WriteSetting("swap_screen", Settings::values.swap_screen, false);
|
||||||
WriteSetting("custom_layout", Settings::values.custom_layout, false);
|
WriteSetting("custom_layout", Settings::values.custom_layout, false);
|
||||||
|
@ -121,6 +121,10 @@ void Handler::Set3DLed(u8 state) {
|
|||||||
shared_page.ledstate_3d = state;
|
shared_page.ledstate_3d = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Handler::Set3DSlider(float slidestate) {
|
||||||
|
shared_page.sliderstate_3d = static_cast<float_le>(slidestate);
|
||||||
|
}
|
||||||
|
|
||||||
SharedPageDef& Handler::GetSharedPage() {
|
SharedPageDef& Handler::GetSharedPage() {
|
||||||
return shared_page;
|
return shared_page;
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,8 @@ public:
|
|||||||
|
|
||||||
void SetWifiLinkLevel(WifiLinkLevel);
|
void SetWifiLinkLevel(WifiLinkLevel);
|
||||||
|
|
||||||
|
void Set3DSlider(float);
|
||||||
|
|
||||||
void Set3DLed(u8);
|
void Set3DLed(u8);
|
||||||
|
|
||||||
SharedPageDef& GetSharedPage();
|
SharedPageDef& GetSharedPage();
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "core/hle/kernel/event.h"
|
#include "core/hle/kernel/event.h"
|
||||||
#include "core/hle/kernel/handle_table.h"
|
#include "core/hle/kernel/handle_table.h"
|
||||||
#include "core/hle/kernel/shared_memory.h"
|
#include "core/hle/kernel/shared_memory.h"
|
||||||
|
#include "core/hle/kernel/shared_page.h"
|
||||||
#include "core/hle/service/hid/hid.h"
|
#include "core/hle/service/hid/hid.h"
|
||||||
#include "core/hle/service/hid/hid_spvr.h"
|
#include "core/hle/service/hid/hid_spvr.h"
|
||||||
#include "core/hle/service/hid/hid_user.h"
|
#include "core/hle/service/hid/hid_user.h"
|
||||||
@ -164,6 +165,10 @@ void Module::UpdatePadCallback(u64 userdata, s64 cycles_late) {
|
|||||||
event_pad_or_touch_1->Signal();
|
event_pad_or_touch_1->Signal();
|
||||||
event_pad_or_touch_2->Signal();
|
event_pad_or_touch_2->Signal();
|
||||||
|
|
||||||
|
// TODO(xperia64): How the 3D Slider is updated by the HID module needs to be RE'd
|
||||||
|
// and possibly moved to its own Core::Timing event.
|
||||||
|
system.Kernel().GetSharedPageHandler().Set3DSlider(Settings::values.factor_3d / 100.0f);
|
||||||
|
|
||||||
// Reschedule recurrent event
|
// Reschedule recurrent event
|
||||||
system.CoreTiming().ScheduleEvent(pad_update_ticks - cycles_late, pad_update_event);
|
system.CoreTiming().ScheduleEvent(pad_update_ticks - cycles_late, pad_update_event);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <atomic>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -156,7 +157,7 @@ struct Values {
|
|||||||
float bg_blue;
|
float bg_blue;
|
||||||
|
|
||||||
bool toggle_3d;
|
bool toggle_3d;
|
||||||
u8 factor_3d;
|
std::atomic<u8> factor_3d;
|
||||||
|
|
||||||
// Audio
|
// Audio
|
||||||
bool enable_dsp_lle;
|
bool enable_dsp_lle;
|
||||||
|
@ -179,7 +179,8 @@ TelemetrySession::TelemetrySession() {
|
|||||||
Settings::values.use_shader_jit);
|
Settings::values.use_shader_jit);
|
||||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_UseVsync", Settings::values.vsync_enabled);
|
AddField(Telemetry::FieldType::UserConfig, "Renderer_UseVsync", Settings::values.vsync_enabled);
|
||||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_Toggle3d", Settings::values.toggle_3d);
|
AddField(Telemetry::FieldType::UserConfig, "Renderer_Toggle3d", Settings::values.toggle_3d);
|
||||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_Factor3d", Settings::values.factor_3d);
|
AddField(Telemetry::FieldType::UserConfig, "Renderer_Factor3d",
|
||||||
|
Settings::values.factor_3d.load());
|
||||||
AddField(Telemetry::FieldType::UserConfig, "System_IsNew3ds", Settings::values.is_new_3ds);
|
AddField(Telemetry::FieldType::UserConfig, "System_IsNew3ds", Settings::values.is_new_3ds);
|
||||||
AddField(Telemetry::FieldType::UserConfig, "System_RegionValue", Settings::values.region_value);
|
AddField(Telemetry::FieldType::UserConfig, "System_RegionValue", Settings::values.region_value);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user