mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-06-18 05:48:46 +02:00
![PixelyIon](/assets/img/avatar_default.png)
This addresses all CR comments including more codebase-wide changes arising from certain review comments like proper usage of its/it's and consistent contraction of it is into it's. An overhaul was made to the presentation and formatting of `KThread.h` and `LoadBalance` works has been superseded by `GetOptimalCoreForThread` which can be used alongside `InsertThread` or `MigrateToCore`. It makes the API far more atomic and neater. This was a major point of contention for the design prior, it's simplified some code and potentially improved performance.
42 lines
1.1 KiB
C++
42 lines
1.1 KiB
C++
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
|
|
|
#pragma once
|
|
|
|
#include "shared_mem.h"
|
|
|
|
namespace skyline::input {
|
|
/*
|
|
* @brief A description of a point being touched on the screen
|
|
* @note All members are jint as it's treated as a jint array in Kotlin
|
|
* @note This structure corresponds to TouchScreenStateData, see that for details
|
|
*/
|
|
struct TouchScreenPoint {
|
|
jint x;
|
|
jint y;
|
|
jint minor;
|
|
jint major;
|
|
jint angle;
|
|
};
|
|
|
|
/**
|
|
* @brief This class is used to manage the shared memory responsible for touch-screen data
|
|
*/
|
|
class TouchManager {
|
|
private:
|
|
const DeviceState &state;
|
|
bool activated{};
|
|
TouchScreenSection §ion;
|
|
|
|
public:
|
|
/**
|
|
* @param hid A pointer to HID Shared Memory on the host
|
|
*/
|
|
TouchManager(const DeviceState &state, input::HidSharedMemory *hid);
|
|
|
|
void Activate();
|
|
|
|
void SetState(const span<TouchScreenPoint> &points);
|
|
};
|
|
}
|