nost: touch piano mode (#830)

## Link to GitHub Issue or related Pull Request, if one exists
n/a

## Description of change
Touch piano mode. Allows piano keys to be played with the touch screen.
Since the touch screen is still needed for menu navigation (including
during songs) a toggle switch is added so that the user can flip between
navigation mode and piano mode.

The touch targets are pixel-perfect. Don't let the game's piano
animations fool you.

## Testing
This commit is contained in:
bicarus
2026-07-23 15:49:50 -07:00
committed by GitHub
parent 80deb4bbbd
commit 64600826b7
15 changed files with 540 additions and 2 deletions
@@ -1,8 +1,23 @@
#pragma once
#include <windows.h>
namespace nativetouch {
struct NativeTouchEvent {
DWORD id;
LONG x;
LONG y;
bool down;
bool move;
bool up;
bool synthetic;
};
using TouchInputFilter = bool (*)(const NativeTouchEvent &event);
void hook(HMODULE module);
void refresh_contact_lifetime();
void set_input_filter(TouchInputFilter filter);
// true once hook() has installed the native touch stack for the current game;
// such games consume touch through the GetTouchInputInfo hook rather than spicetouch