CoreTiming: Reworked CoreTiming (#3119)

* CoreTiming: New CoreTiming; Add Test for CoreTiming
This commit is contained in:
B3n30 2017-11-25 14:56:57 +01:00 committed by GitHub
parent b7cf793814
commit e9a95b2e7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 678 additions and 593 deletions

View file

@ -117,7 +117,7 @@ constexpr std::array<int, 13> LATENCY_BY_FRAME_RATE{{
std::array<CameraConfig, NumCameras> cameras;
std::array<PortConfig, 2> ports;
int completion_event_callback;
CoreTiming::EventType* completion_event_callback;
const ResultCode ERROR_INVALID_ENUM_VALUE(ErrorDescription::InvalidEnumValue, ErrorModule::CAM,
ErrorSummary::InvalidArgument, ErrorLevel::Usage);

View file

@ -41,9 +41,9 @@ static u32 next_gyroscope_index;
static int enable_accelerometer_count; // positive means enabled
static int enable_gyroscope_count; // positive means enabled
static int pad_update_event;
static int accelerometer_update_event;
static int gyroscope_update_event;
static CoreTiming::EventType* pad_update_event;
static CoreTiming::EventType* accelerometer_update_event;
static CoreTiming::EventType* gyroscope_update_event;
// Updating period for each HID device. These empirical values are measured from a 11.2 3DS.
constexpr u64 pad_update_ticks = BASE_CLOCK_RATE_ARM11 / 234;

View file

@ -9,6 +9,10 @@
#include "core/frontend/input.h"
#include "core/hle/service/ir/ir_user.h"
namespace CoreTiming {
struct EventType;
} // namespace CoreTiming
namespace Service {
namespace IR {
@ -36,7 +40,7 @@ private:
void LoadInputDevices();
u8 hid_period;
int hid_polling_callback_id;
CoreTiming::EventType* hid_polling_callback_id;
std::array<u8, 0x40> calibration_data;
std::unique_ptr<Input::ButtonDevice> zl;
std::unique_ptr<Input::ButtonDevice> zr;

View file

@ -51,7 +51,7 @@ static_assert(sizeof(SharedMem) == 0x98, "SharedMem has wrong size!");
static Kernel::SharedPtr<Kernel::Event> update_event;
static Kernel::SharedPtr<Kernel::SharedMemory> shared_memory;
static u32 next_pad_index;
static int update_callback_id;
static CoreTiming::EventType* update_callback_id;
static std::unique_ptr<Input::ButtonDevice> zl_button;
static std::unique_ptr<Input::ButtonDevice> zr_button;
static std::unique_ptr<Input::AnalogDevice> c_stick;

View file

@ -76,7 +76,7 @@ static u8 network_channel = DefaultNetworkChannel;
static NetworkInfo network_info;
// Event that will generate and send the 802.11 beacon frames.
static int beacon_broadcast_event;
static CoreTiming::EventType* beacon_broadcast_event;
// Mutex to synchronize access to the connection status between the emulation thread and the
// network thread.