mirror of
https://gitea.tendokyu.moe/TeamTofuShop/segatools.git
synced 2026-09-28 04:48:00 +03:00
This adds a setting to the global configuration to allow only input when the game is focused. This prevents issues, such as triggering game buttons or service buttons while being tabbed out. Turned off by default. The implementation is not the best, but in the context how these games are structured, the most acceptable. It will keep scanning if the foreground window title fully matches (some games partially match, like FGO because due to the revision number in the title), and if found, will grab the HWND of that window and compare that from then on, to not tank performance due to constant string operations. Tested with FGO, chusan and ongeki. Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/83 Reviewed-by: Dniel97 <dniel97@noreply.gitea.tendokyu.moe> Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
18 lines
302 B
C
18 lines
302 B
C
#pragma once
|
|
|
|
#include <windows.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
struct revio_config {
|
|
bool enable;
|
|
bool foreground;
|
|
uint8_t test;
|
|
uint8_t service;
|
|
uint8_t coin;
|
|
uint8_t up;
|
|
uint8_t down;
|
|
uint8_t cancel;
|
|
};
|
|
|
|
HRESULT revio_hook_init(struct revio_config *cfg); |