mirror of
https://gitea.tendokyu.moe/TeamTofuShop/segatools.git
synced 2026-09-29 21:38:00 +03:00
Requires https://gitea.tendokyu.moe/TeamTofuShop/capnhook/pulls/8 This adds the following: 1. Fixes `am::abaas::FileSearchSuite::isAvailableAbsolutePath: Line259 ERROR: folder is unavailable (Y:\SDEM\log\\SDFU)` by hooking `DeviceIoControl` with `FSCTL_SET_REPARSE_POINT`. Sega decided to use the most bizzare way possible of creating symbolic links. These are created in the AbaaS log directory inside SDEM and point to the appdata directories for the sub-games. Magic numbers have been taken from amdaemon decompilation. That whole API is very sparsely documented on the Microsoft side. 2. Fixes distribution server settings not applying. Unlike most other games, the daemon config files do not have dipswitch filters in them. Instead the distribution setting is determined by running `hwvalue.exe` twice and checking it's exit code. This has been added to `launch.bat` and requires the linked addition for inject. 3. Implemented `get_opbtns` and added extra buttons for dinput. * `get_opbtns` existed but was never implemented. Added the ability to bind dinput buttons for test/service. * DirectInput is weird. The controller I'm using is sending directional keys as buttons rather than a D-Pad, so I was unable to bind it. These extra directional buttons can be bound in addition to the bindings that exist for a D-Pad. 4. Fixes audio in Rolling Gunner by setting the CWD to the root of the C:\ drive before starting a game. lol. lmao even. 5. Add a `DefineDosDevice` for Y:\ to fix Blazblue crashing They hardcoded the damn path to appdata instead of retrieving it from the apm.dll... Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/123 Co-authored-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com> Co-committed-by: kyoubate-haruka <46010460+kyoubate-haruka@users.noreply.github.com>
55 lines
1.1 KiB
C
55 lines
1.1 KiB
C
#pragma once
|
|
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#define APM3_BUTTON_COUNT 8
|
|
|
|
struct apm3_di_config {
|
|
wchar_t device_name[64];
|
|
uint8_t test;
|
|
uint8_t service;
|
|
uint8_t start;
|
|
uint8_t home;
|
|
uint8_t button[8];
|
|
uint8_t up;
|
|
uint8_t right;
|
|
uint8_t down;
|
|
uint8_t left;
|
|
};
|
|
|
|
struct apm3_xi_config {
|
|
bool analog_stick_enabled;
|
|
};
|
|
|
|
struct apm3_kb_config {
|
|
uint8_t vk_start;
|
|
uint8_t vk_home;
|
|
|
|
uint8_t vk_up;
|
|
uint8_t vk_right;
|
|
uint8_t vk_down;
|
|
uint8_t vk_left;
|
|
|
|
uint8_t vk_buttons[APM3_BUTTON_COUNT];
|
|
};
|
|
|
|
struct apm3_io_config {
|
|
uint8_t vk_test;
|
|
uint8_t vk_service;
|
|
uint8_t vk_coin;
|
|
|
|
wchar_t mode[9];
|
|
|
|
struct apm3_kb_config kb;
|
|
struct apm3_di_config di;
|
|
struct apm3_xi_config xi;
|
|
};
|
|
|
|
void apm3_io_config_load(struct apm3_io_config *cfg, const wchar_t *filename);
|
|
|
|
void apm3_kb_config_load(struct apm3_kb_config *cfg, const wchar_t *filename);
|
|
void apm3_di_config_load(struct apm3_di_config *cfg, const wchar_t *filename);
|
|
void apm3_xi_config_load(struct apm3_xi_config *cfg, const wchar_t *filename);
|