early-access version 3971
This commit is contained in:
@@ -68,10 +68,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void InvalidateEntireInstructionCache(Core::System& system) {
|
||||
system.InvalidateCpuInstructionCaches();
|
||||
}
|
||||
|
||||
template <typename AddressType>
|
||||
void InvalidateInstructionCache(Core::System& system, AddressType addr, u64 size) {
|
||||
system.InvalidateCpuInstructionCacheRange(GetInteger(addr), size);
|
||||
@@ -435,9 +431,6 @@ void KPageTableBase::Finalize() {
|
||||
m_mapped_ipc_server_memory);
|
||||
}
|
||||
|
||||
// Invalidate the entire instruction cache.
|
||||
InvalidateEntireInstructionCache(m_system);
|
||||
|
||||
// Close the backing page table, as the destructor is not called for guest objects.
|
||||
m_impl.reset();
|
||||
}
|
||||
|
||||
@@ -3,16 +3,18 @@
|
||||
|
||||
#include <queue>
|
||||
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hid/emulated_controller.h"
|
||||
#include "core/hid/hid_core.h"
|
||||
#include "core/hle/service/hid/irsensor/clustering_processor.h"
|
||||
|
||||
namespace Service::IRS {
|
||||
ClusteringProcessor::ClusteringProcessor(Core::HID::HIDCore& hid_core_,
|
||||
ClusteringProcessor::ClusteringProcessor(Core::System& system_,
|
||||
Core::IrSensor::DeviceFormat& device_format,
|
||||
std::size_t npad_index)
|
||||
: device{device_format} {
|
||||
npad_device = hid_core_.GetEmulatedControllerByIndex(npad_index);
|
||||
: device{device_format}, system{system_} {
|
||||
npad_device = system.HIDCore().GetEmulatedControllerByIndex(npad_index);
|
||||
|
||||
device.mode = Core::IrSensor::IrSensorMode::ClusteringProcessor;
|
||||
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
||||
@@ -83,7 +85,7 @@ void ClusteringProcessor::OnControllerUpdate(Core::HID::ControllerTriggerType ty
|
||||
}
|
||||
|
||||
next_state.sampling_number = camera_data.sample;
|
||||
next_state.timestamp = next_state.timestamp + 131;
|
||||
next_state.timestamp = system.CoreTiming().GetGlobalTimeNs().count();
|
||||
next_state.ambient_noise_level = Core::IrSensor::CameraAmbientNoiseLevel::Low;
|
||||
shared_memory->clustering_lifo.WriteNextEntry(next_state);
|
||||
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
#include "core/hle/service/hid/irs_ring_lifo.h"
|
||||
#include "core/hle/service/hid/irsensor/processor_base.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Core::HID {
|
||||
class EmulatedController;
|
||||
} // namespace Core::HID
|
||||
@@ -15,8 +19,7 @@ class EmulatedController;
|
||||
namespace Service::IRS {
|
||||
class ClusteringProcessor final : public ProcessorBase {
|
||||
public:
|
||||
explicit ClusteringProcessor(Core::HID::HIDCore& hid_core_,
|
||||
Core::IrSensor::DeviceFormat& device_format,
|
||||
explicit ClusteringProcessor(Core::System& system_, Core::IrSensor::DeviceFormat& device_format,
|
||||
std::size_t npad_index);
|
||||
~ClusteringProcessor() override;
|
||||
|
||||
@@ -106,5 +109,7 @@ private:
|
||||
Core::IrSensor::DeviceFormat& device;
|
||||
Core::HID::EmulatedController* npad_device;
|
||||
int callback_key{};
|
||||
|
||||
Core::System& system;
|
||||
};
|
||||
} // namespace Service::IRS
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
#include "core/hid/emulated_controller.h"
|
||||
#include "core/hid/hid_core.h"
|
||||
#include "core/hle/service/hid/irsensor/moment_processor.h"
|
||||
@@ -10,11 +12,10 @@ static constexpr auto format = Core::IrSensor::ImageTransferProcessorFormat::Siz
|
||||
static constexpr std::size_t ImageWidth = 40;
|
||||
static constexpr std::size_t ImageHeight = 30;
|
||||
|
||||
MomentProcessor::MomentProcessor(Core::HID::HIDCore& hid_core_,
|
||||
Core::IrSensor::DeviceFormat& device_format,
|
||||
MomentProcessor::MomentProcessor(Core::System& system_, Core::IrSensor::DeviceFormat& device_format,
|
||||
std::size_t npad_index)
|
||||
: device(device_format) {
|
||||
npad_device = hid_core_.GetEmulatedControllerByIndex(npad_index);
|
||||
: device(device_format), system{system_} {
|
||||
npad_device = system.HIDCore().GetEmulatedControllerByIndex(npad_index);
|
||||
|
||||
device.mode = Core::IrSensor::IrSensorMode::MomentProcessor;
|
||||
device.camera_status = Core::IrSensor::IrCameraStatus::Unconnected;
|
||||
@@ -69,7 +70,7 @@ void MomentProcessor::OnControllerUpdate(Core::HID::ControllerTriggerType type)
|
||||
}
|
||||
|
||||
next_state.sampling_number = camera_data.sample;
|
||||
next_state.timestamp = next_state.timestamp + 131;
|
||||
next_state.timestamp = system.CoreTiming().GetGlobalTimeNs().count();
|
||||
next_state.ambient_noise_level = Core::IrSensor::CameraAmbientNoiseLevel::Low;
|
||||
shared_memory->moment_lifo.WriteNextEntry(next_state);
|
||||
|
||||
|
||||
@@ -9,11 +9,19 @@
|
||||
#include "core/hle/service/hid/irs_ring_lifo.h"
|
||||
#include "core/hle/service/hid/irsensor/processor_base.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Core::HID {
|
||||
class EmulatedController;
|
||||
} // namespace Core::HID
|
||||
|
||||
namespace Service::IRS {
|
||||
class MomentProcessor final : public ProcessorBase {
|
||||
public:
|
||||
explicit MomentProcessor(Core::HID::HIDCore& hid_core_,
|
||||
Core::IrSensor::DeviceFormat& device_format, std::size_t npad_index);
|
||||
explicit MomentProcessor(Core::System& system_, Core::IrSensor::DeviceFormat& device_format,
|
||||
std::size_t npad_index);
|
||||
~MomentProcessor() override;
|
||||
|
||||
// Called when the processor is initialized
|
||||
@@ -76,6 +84,8 @@ private:
|
||||
Core::IrSensor::DeviceFormat& device;
|
||||
Core::HID::EmulatedController* npad_device;
|
||||
int callback_key{};
|
||||
|
||||
Core::System& system;
|
||||
};
|
||||
|
||||
} // namespace Service::IRS
|
||||
|
||||
Reference in New Issue
Block a user