mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 17:16:57 +02:00
25 lines
551 B
C++
25 lines
551 B
C++
#pragma once
|
|
#include "common.h"
|
|
#include <nds/input.h>
|
|
#include "ITouchInputSource.h"
|
|
#include "sharedMemory.h"
|
|
|
|
/// @brief Input source from the physical DS touch screen.
|
|
class TouchInputSource : public ITouchInputSource
|
|
{
|
|
public:
|
|
bool Sample(Point& touchPosition) const override
|
|
{
|
|
if (SHARED_KEY_XY & (1 << 6))
|
|
{
|
|
touchPosition = Point(0, 0);
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
touchPosition = Point(SHARED_TOUCH_X, SHARED_TOUCH_Y);
|
|
return true;
|
|
}
|
|
}
|
|
};
|