mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 09:06:54 +02:00
Add touch input support, add fast scrolling support for coverflow display mode, fix use after free bug in banner list mode
This commit is contained in:
24
arm9/source/gui/input/TouchInputSource.h
Normal file
24
arm9/source/gui/input/TouchInputSource.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#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;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user