Files
spice2x.github.io/src/spice2x/touch/native/nativetouchhook.h
T
bicarus 64600826b7 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
2026-07-23 15:49:50 -07:00

26 lines
617 B
C++

#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
bool is_hooked();
}