Skip to content
Snippets Groups Projects
Commit c337272c authored by Zach Hilman's avatar Zach Hilman
Browse files

Fill in more fields in TouchScreenEntryTouch

parent f2f36801
No related branches found
No related tags found
No related merge requests found
...@@ -166,13 +166,18 @@ private: ...@@ -166,13 +166,18 @@ private:
touchscreen.entries[curr_entry].header.timestamp = sample_counter; touchscreen.entries[curr_entry].header.timestamp = sample_counter;
TouchScreenEntryTouch touch_entry{}; TouchScreenEntryTouch touch_entry{};
float x; auto [x, y, pressed] = touch_device->GetStatus();
float y; touch_entry.timestamp = timestamp;
bool pressed;
std::tie(x, y, pressed) = touch_device->GetStatus();
touch_entry.x = static_cast<u16>(x * Layout::ScreenUndocked::Width); touch_entry.x = static_cast<u16>(x * Layout::ScreenUndocked::Width);
touch_entry.y = static_cast<u16>(y * Layout::ScreenUndocked::Height); touch_entry.y = static_cast<u16>(y * Layout::ScreenUndocked::Height);
touch_entry.touch_index = 0;
// TODO(DarkLordZach): Maybe try to derive these from EmuWindow?
touch_entry.diameter_x = 15;
touch_entry.diameter_y = 15;
touch_entry.angle = 0;
// TODO(DarkLordZach): Implement multi-touch support
if (pressed) { if (pressed) {
touchscreen.entries[curr_entry].header.num_touches = 1; touchscreen.entries[curr_entry].header.num_touches = 1;
touchscreen.entries[curr_entry].touches[0] = touch_entry; touchscreen.entries[curr_entry].touches[0] = touch_entry;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment