mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-10-05 01:38:12 -07:00
5d25fdb035
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change Debouce option for touch input. Applies to all touch handlers (rawinput, win8, win7) since it sits at the touch layer, and then consumed by jb touch logic. ## Testing
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <bitset>
|
|
#include <cstdint>
|
|
#include <windows.h>
|
|
|
|
namespace games::jb {
|
|
|
|
// touch detection algorithm
|
|
enum JubeatTouchAlgorithm {
|
|
Legacy,
|
|
Improved,
|
|
Plus,
|
|
AcAccurate
|
|
};
|
|
|
|
// debug touch overlay mode
|
|
enum JubeatTouchDebugMode {
|
|
JbTouchDebugAuto, // boundary boxes when a touch screen is detected, else nothing
|
|
JbTouchDebugNone, // draw nothing
|
|
JbTouchDebugBox, // boundary boxes
|
|
JbTouchDebugAll, // boundary boxes and touch circles
|
|
};
|
|
|
|
// selected algorithm and debug mode (set from the launcher options)
|
|
extern JubeatTouchAlgorithm TOUCH_ALGORITHM;
|
|
extern JubeatTouchDebugMode TOUCH_DEBUG_OVERLAY;
|
|
|
|
// minimum contact age in milliseconds before a touch registers (0 = off);
|
|
// filters momentary phantom touches from noisy panels
|
|
extern uint32_t TOUCH_DEBOUNCE_MS;
|
|
|
|
// atomically published panel state, read by the I/O layer
|
|
std::bitset<16> touch_state();
|
|
|
|
// read the current touch points and refresh the panel state
|
|
void touch_update();
|
|
|
|
// enable/disable touch handling on game attach/detach
|
|
void touch_attach();
|
|
void touch_detach();
|
|
|
|
// whether the debug overlay should currently draw anything
|
|
bool touch_debug_overlay_enabled();
|
|
|
|
// draw the debug touch overlay (boundary boxes and/or touch circles per the
|
|
// selected mode) onto the spice touch overlay window's device context
|
|
void touch_draw_debug_overlay(HDC hdc);
|
|
}
|