yuzu/src/core/hle/service/hid/controllers/stubbed.cpp

40 lines
1 KiB
C++
Raw Normal View History

2018-10-05 16:23:21 +02:00
// Copyright 2018 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
2018-10-06 05:14:42 +02:00
#include <cstring>
2018-10-05 16:23:21 +02:00
#include "common/common_types.h"
#include "core/core_timing.h"
#include "core/hle/service/hid/controllers/stubbed.h"
namespace Service::HID {
2018-10-06 05:14:42 +02:00
Controller_Stubbed::Controller_Stubbed() = default;
Controller_Stubbed::~Controller_Stubbed() = default;
2018-10-06 05:14:42 +02:00
2018-10-05 16:23:21 +02:00
void Controller_Stubbed::OnInit() {}
2018-10-06 05:14:42 +02:00
2018-10-05 16:23:21 +02:00
void Controller_Stubbed::OnRelease() {}
2018-10-06 05:14:42 +02:00
void Controller_Stubbed::OnUpdate(u8* data, std::size_t size) {
2018-10-05 16:23:21 +02:00
if (!smart_update) {
return;
}
CommonHeader header{};
header.timestamp = CoreTiming::GetTicks();
header.total_entry_count = 17;
header.entry_count = 0;
header.last_entry_index = 0;
std::memcpy(data + common_offset, &header, sizeof(CommonHeader));
}
2018-10-06 05:14:42 +02:00
2018-10-05 16:23:21 +02:00
void Controller_Stubbed::OnLoadInputDevices() {}
2018-10-06 05:14:42 +02:00
void Controller_Stubbed::SetCommonHeaderOffset(std::size_t off) {
2018-10-05 16:23:21 +02:00
common_offset = off;
smart_update = true;
}
2018-10-06 05:14:42 +02:00
} // namespace Service::HID