mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 14:20:42 -07:00
64600826b7
## 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
26 lines
617 B
C++
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();
|
|
}
|
|
|