mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-01 21:04:19 +01:00
Merge pull request #3823 from ogniK5377/setvrmode
am: IsVrModeEnabled & SetVrModeEnabled fixes
This commit is contained in:
commit
f88d2f5739
@ -52,11 +52,6 @@ enum class LaunchParameterKind : u32 {
|
|||||||
AccountPreselectedUser = 2,
|
AccountPreselectedUser = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class VrMode : u8 {
|
|
||||||
Disabled = 0,
|
|
||||||
Enabled = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
constexpr u32 LAUNCH_PARAMETER_ACCOUNT_PRESELECTED_USER_MAGIC = 0xC79497CA;
|
constexpr u32 LAUNCH_PARAMETER_ACCOUNT_PRESELECTED_USER_MAGIC = 0xC79497CA;
|
||||||
|
|
||||||
struct LaunchParameterAccountPreselectedUser {
|
struct LaunchParameterAccountPreselectedUser {
|
||||||
@ -685,27 +680,21 @@ void ICommonStateGetter::GetCurrentFocusState(Kernel::HLERequestContext& ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::IsVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::IsVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_DEBUG(Service_AM, "called");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
rb.PushEnum(VrMode::Disabled);
|
rb.Push(vr_mode_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::SetVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::SetVrModeEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
IPC::RequestParser rp{ctx};
|
||||||
const auto is_vr_mode_enabled = rp.Pop<bool>();
|
vr_mode_state = rp.Pop<bool>();
|
||||||
|
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called. is_vr_mode_enabled={}", is_vr_mode_enabled);
|
LOG_WARNING(Service_AM, "VR Mode is {}", vr_mode_state ? "on" : "off");
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
if (!is_vr_mode_enabled) {
|
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
} else {
|
|
||||||
// TODO: Find better error code for this
|
|
||||||
UNIMPLEMENTED_MSG("is_vr_mode_enabled={}", is_vr_mode_enabled);
|
|
||||||
rb.Push(RESULT_UNKNOWN);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx) {
|
void ICommonStateGetter::SetLcdBacklighOffEnabled(Kernel::HLERequestContext& ctx) {
|
||||||
|
@ -191,6 +191,7 @@ private:
|
|||||||
|
|
||||||
Core::System& system;
|
Core::System& system;
|
||||||
std::shared_ptr<AppletMessageQueue> msg_queue;
|
std::shared_ptr<AppletMessageQueue> msg_queue;
|
||||||
|
bool vr_mode_state{};
|
||||||
};
|
};
|
||||||
|
|
||||||
class IStorageImpl {
|
class IStorageImpl {
|
||||||
|
Loading…
Reference in New Issue
Block a user