mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-12-01 11:16:41 -08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce87d20f25 | ||
|
|
3e3db7a411 |
No files matched your search
@@ -541,6 +541,7 @@ set(SOURCE_FILES ${SOURCE_FILES}
|
|||||||
games/onpara/touchpanel.cpp
|
games/onpara/touchpanel.cpp
|
||||||
games/bc/bc.cpp
|
games/bc/bc.cpp
|
||||||
games/bc/io.cpp
|
games/bc/io.cpp
|
||||||
|
games/bc/bi2x_hook.cpp
|
||||||
games/ccj/ccj.cpp
|
games/ccj/ccj.cpp
|
||||||
games/ccj/io.cpp
|
games/ccj/io.cpp
|
||||||
games/ccj/bi2x_hook.cpp
|
games/ccj/bi2x_hook.cpp
|
||||||
|
|||||||
+28
-14
@@ -1,25 +1,30 @@
|
|||||||
#include "bc.h"
|
#include "bc.h"
|
||||||
|
|
||||||
|
#include <format>
|
||||||
#include "hooks/setupapihook.h"
|
#include "hooks/setupapihook.h"
|
||||||
|
#include "util/fileutils.h"
|
||||||
#include "util/libutils.h"
|
#include "util/libutils.h"
|
||||||
#include "acio2emu/handle.h"
|
#include "acio2emu/handle.h"
|
||||||
#include "acioemu/handle.h"
|
#include "acioemu/handle.h"
|
||||||
#include "hooks/graphics/graphics.h"
|
#include "hooks/graphics/graphics.h"
|
||||||
#include "util/detour.h"
|
#include "util/unity_player.h"
|
||||||
#include "node.h"
|
#include "node.h"
|
||||||
|
#include "bi2x_hook.h"
|
||||||
|
|
||||||
namespace games::bc {
|
namespace games::bc {
|
||||||
|
|
||||||
static decltype(ShowCursor) *ShowCursor_orig = nullptr;
|
std::string BC_INJECT_ARGS = "";
|
||||||
|
|
||||||
static int WINAPI ShowCursor_hook(BOOL bShow) {
|
|
||||||
// log_misc("bsac", "ShowCursor {}", bShow);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BCGame::attach() {
|
void BCGame::attach() {
|
||||||
Game::attach();
|
Game::attach();
|
||||||
|
|
||||||
|
// create required directories
|
||||||
|
fileutils::dir_create_recursive("dev/raw/log");
|
||||||
|
|
||||||
|
// preload libraries
|
||||||
|
libutils::load_library("libaio.dll");
|
||||||
|
libutils::load_library("libaio-iob2_video.dll");
|
||||||
|
|
||||||
setupapihook_init(libutils::load_library("libaio.dll"));
|
setupapihook_init(libutils::load_library("libaio.dll"));
|
||||||
|
|
||||||
SETUPAPI_SETTINGS settings {};
|
SETUPAPI_SETTINGS settings {};
|
||||||
@@ -32,15 +37,24 @@ namespace games::bc {
|
|||||||
auto iob = new acio2emu::IOBHandle(L"COM3");
|
auto iob = new acio2emu::IOBHandle(L"COM3");
|
||||||
iob->register_node(std::make_unique<TBSNode>());
|
iob->register_node(std::make_unique<TBSNode>());
|
||||||
|
|
||||||
if (GRAPHICS_SHOW_CURSOR) {
|
#if SPICE64
|
||||||
detour::trampoline_try(
|
// insert BI2X hooks
|
||||||
"user32.dll", "ShowCursor",
|
bi2x_hook_init();
|
||||||
(void*)ShowCursor_hook, (void**)&ShowCursor_orig);
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
devicehook_init();
|
devicehook_init_trampoline();
|
||||||
devicehook_add(iob);
|
devicehook_add(iob);
|
||||||
devicehook_add(new acioemu::ACIOHandle(L"COM1"));
|
devicehook_add(new acioemu::ACIOHandle(L"COM1"));
|
||||||
|
|
||||||
|
if (GRAPHICS_SHOW_CURSOR) {
|
||||||
|
unity_utils::force_show_cursor(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
unity_utils::set_args(
|
||||||
|
std::format("{} {}{}",
|
||||||
|
GetCommandLineA(),
|
||||||
|
BC_INJECT_ARGS,
|
||||||
|
unity_utils::get_unity_player_args()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BCGame::detach() {
|
void BCGame::detach() {
|
||||||
@@ -48,4 +62,4 @@ namespace games::bc {
|
|||||||
|
|
||||||
devicehook_dispose();
|
devicehook_dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <string>
|
||||||
#include "games/game.h"
|
#include "games/game.h"
|
||||||
|
|
||||||
namespace games::bc {
|
namespace games::bc {
|
||||||
|
extern std::string BC_INJECT_ARGS;
|
||||||
|
|
||||||
class BCGame : public games::Game {
|
class BCGame : public games::Game {
|
||||||
public:
|
public:
|
||||||
BCGame() : Game("Busou Shinki: Armored Princess Battle Conductor") {}
|
BCGame() : Game("Busou Shinki: Armored Princess Battle Conductor") {}
|
||||||
|
|||||||
@@ -0,0 +1,163 @@
|
|||||||
|
#include "bi2x_hook.h"
|
||||||
|
|
||||||
|
#if SPICE64
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <iterator>
|
||||||
|
|
||||||
|
#include "util/detour.h"
|
||||||
|
#include "util/logging.h"
|
||||||
|
#include "rawinput/rawinput.h"
|
||||||
|
#include "games/io.h"
|
||||||
|
#include "io.h"
|
||||||
|
#include "util/tapeled.h"
|
||||||
|
|
||||||
|
namespace games::bc {
|
||||||
|
|
||||||
|
struct AIO_IOB2_BI2X_TBS;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* typedefs
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef void (__fastcall *aioIob2Bi2xTBS_GetDeviceStatus_t)(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, void *o_DevStatus);
|
||||||
|
typedef void (__fastcall *aioIob2Bi2xTBS_SetButton0Lamp_t)(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, bool i_bOn);
|
||||||
|
typedef void (__fastcall *aioIob2Bi2xTBS_SetIrLed_t)(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, bool i_bOn);
|
||||||
|
typedef void (__fastcall *aioIob2Bi2xTBS_SetIccrLed_t)(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, uint32_t i_RGB);
|
||||||
|
typedef void (__fastcall *aioIob2Bi2xTBS_SetStickLed_t)(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, uint32_t i_RGB);
|
||||||
|
typedef void (__fastcall *aioIob2Bi2xTBS_SetTapeLedData_t)(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, uint32_t i_TapeLed, uint8_t *i_pData);
|
||||||
|
|
||||||
|
static aioIob2Bi2xTBS_GetDeviceStatus_t aioIob2Bi2xTBS_GetDeviceStatus_orig = nullptr;
|
||||||
|
static aioIob2Bi2xTBS_SetButton0Lamp_t aioIob2Bi2xTBS_SetButton0Lamp_orig = nullptr;
|
||||||
|
static aioIob2Bi2xTBS_SetIrLed_t aioIob2Bi2xTBS_SetIrLed_orig = nullptr;
|
||||||
|
static aioIob2Bi2xTBS_SetIccrLed_t aioIob2Bi2xTBS_SetIccrLed_orig = nullptr;
|
||||||
|
static aioIob2Bi2xTBS_SetStickLed_t aioIob2Bi2xTBS_SetStickLed_orig = nullptr;
|
||||||
|
static aioIob2Bi2xTBS_SetTapeLedData_t aioIob2Bi2xTBS_SetTapeLedData_orig = nullptr;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* hooks
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void write_light_rgb(
|
||||||
|
Lights::bc_lights_t r, Lights::bc_lights_t g, Lights::bc_lights_t b, uint32_t color) {
|
||||||
|
|
||||||
|
auto &lights = get_lights();
|
||||||
|
GameAPI::Lights::writeLight(RI_MGR, lights.at(r), ((color >> 16) & 0xFF) / 255.f);
|
||||||
|
GameAPI::Lights::writeLight(RI_MGR, lights.at(g), ((color >> 8) & 0xFF) / 255.f);
|
||||||
|
GameAPI::Lights::writeLight(RI_MGR, lights.at(b), (color & 0xFF) / 255.f);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __fastcall aioIob2Bi2xTBS_GetDeviceStatus(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, void *o_DevStatus) {
|
||||||
|
|
||||||
|
RI_MGR->devices_flush_output();
|
||||||
|
|
||||||
|
if (aioIob2Bi2xTBS_GetDeviceStatus_orig) {
|
||||||
|
aioIob2Bi2xTBS_GetDeviceStatus_orig(i_pNodeCtl, o_DevStatus);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __fastcall aioIob2Bi2xTBS_SetButton0Lamp(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, bool i_bOn) {
|
||||||
|
|
||||||
|
auto &lights = get_lights();
|
||||||
|
GameAPI::Lights::writeLight(RI_MGR, lights.at(Lights::Button), (i_bOn ? 1.f : 0.f));
|
||||||
|
|
||||||
|
if (aioIob2Bi2xTBS_SetButton0Lamp_orig) {
|
||||||
|
aioIob2Bi2xTBS_SetButton0Lamp_orig(i_pNodeCtl, i_bOn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __fastcall aioIob2Bi2xTBS_SetIrLed(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, bool i_bOn) {
|
||||||
|
|
||||||
|
auto &lights = get_lights();
|
||||||
|
GameAPI::Lights::writeLight(RI_MGR, lights.at(Lights::IrLed), (i_bOn ? 1.f : 0.f));
|
||||||
|
|
||||||
|
if (aioIob2Bi2xTBS_SetIrLed_orig) {
|
||||||
|
aioIob2Bi2xTBS_SetIrLed_orig(i_pNodeCtl, i_bOn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __fastcall aioIob2Bi2xTBS_SetIccrLed(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, uint32_t i_RGB) {
|
||||||
|
|
||||||
|
write_light_rgb(Lights::CardReader_R, Lights::CardReader_G, Lights::CardReader_B, i_RGB);
|
||||||
|
|
||||||
|
if (aioIob2Bi2xTBS_SetIccrLed_orig) {
|
||||||
|
aioIob2Bi2xTBS_SetIccrLed_orig(i_pNodeCtl, i_RGB);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __fastcall aioIob2Bi2xTBS_SetStickLed(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, uint32_t i_RGB) {
|
||||||
|
|
||||||
|
write_light_rgb(Lights::Joystick_R, Lights::Joystick_G, Lights::Joystick_B, i_RGB);
|
||||||
|
|
||||||
|
if (aioIob2Bi2xTBS_SetStickLed_orig) {
|
||||||
|
aioIob2Bi2xTBS_SetStickLed_orig(i_pNodeCtl, i_RGB);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __fastcall aioIob2Bi2xTBS_SetTapeLedData(
|
||||||
|
AIO_IOB2_BI2X_TBS *i_pNodeCtl, uint32_t i_TapeLed, uint8_t *i_pData) {
|
||||||
|
|
||||||
|
static struct TapeLedMapping {
|
||||||
|
size_t data_size;
|
||||||
|
int r, g, b;
|
||||||
|
|
||||||
|
TapeLedMapping(size_t data_size, int r, int g, int b)
|
||||||
|
: data_size(data_size), r(r), g(g), b(b) {}
|
||||||
|
} mapping[] = {
|
||||||
|
{ 48, Lights::TitlePanel_R, Lights::TitlePanel_G, Lights::TitlePanel_B },
|
||||||
|
{ 49, Lights::SidePanel_R, Lights::SidePanel_G, Lights::SidePanel_B },
|
||||||
|
};
|
||||||
|
|
||||||
|
if (tapeledutils::is_enabled() && i_TapeLed < std::size(mapping)) {
|
||||||
|
auto &map = mapping[i_TapeLed];
|
||||||
|
const auto rgb = tapeledutils::pick_color_from_led_tape(i_pData, map.data_size);
|
||||||
|
|
||||||
|
auto &lights = get_lights();
|
||||||
|
GameAPI::Lights::writeLight(RI_MGR, lights.at(map.r), rgb.r);
|
||||||
|
GameAPI::Lights::writeLight(RI_MGR, lights.at(map.g), rgb.g);
|
||||||
|
GameAPI::Lights::writeLight(RI_MGR, lights.at(map.b), rgb.b);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aioIob2Bi2xTBS_SetTapeLedData_orig) {
|
||||||
|
aioIob2Bi2xTBS_SetTapeLedData_orig(i_pNodeCtl, i_TapeLed, i_pData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void bi2x_hook_init() {
|
||||||
|
static bool initialized = false;
|
||||||
|
if (initialized) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
initialized = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
log_info("bc_bi2x_hook", "init");
|
||||||
|
|
||||||
|
const auto libaioIob2VideoDll = "libaio-iob2_video.dll";
|
||||||
|
detour::trampoline_try(libaioIob2VideoDll, "aioIob2Bi2xTBS_GetDeviceStatus",
|
||||||
|
aioIob2Bi2xTBS_GetDeviceStatus, &aioIob2Bi2xTBS_GetDeviceStatus_orig);
|
||||||
|
detour::trampoline_try(libaioIob2VideoDll, "aioIob2Bi2xTBS_SetButton0Lamp",
|
||||||
|
aioIob2Bi2xTBS_SetButton0Lamp, &aioIob2Bi2xTBS_SetButton0Lamp_orig);
|
||||||
|
detour::trampoline_try(libaioIob2VideoDll, "aioIob2Bi2xTBS_SetIrLed",
|
||||||
|
aioIob2Bi2xTBS_SetIrLed, &aioIob2Bi2xTBS_SetIrLed_orig);
|
||||||
|
detour::trampoline_try(libaioIob2VideoDll, "aioIob2Bi2xTBS_SetIccrLed",
|
||||||
|
aioIob2Bi2xTBS_SetIccrLed, &aioIob2Bi2xTBS_SetIccrLed_orig);
|
||||||
|
detour::trampoline_try(libaioIob2VideoDll, "aioIob2Bi2xTBS_SetStickLed",
|
||||||
|
aioIob2Bi2xTBS_SetStickLed, &aioIob2Bi2xTBS_SetStickLed_orig);
|
||||||
|
detour::trampoline_try(libaioIob2VideoDll, "aioIob2Bi2xTBS_SetTapeLedData",
|
||||||
|
aioIob2Bi2xTBS_SetTapeLedData, &aioIob2Bi2xTBS_SetTapeLedData_orig);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if SPICE64
|
||||||
|
|
||||||
|
namespace games::bc {
|
||||||
|
void bi2x_hook_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -47,4 +47,32 @@ std::vector<Analog> &games::bc::get_analogs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return analogs;
|
return analogs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<Light> &games::bc::get_lights() {
|
||||||
|
static std::vector<Light> lights;
|
||||||
|
|
||||||
|
if (lights.empty()) {
|
||||||
|
lights = GameAPI::Lights::getLights("Busou Shinki: Armored Princess Battle Conductor");
|
||||||
|
|
||||||
|
GameAPI::Lights::sortLights(
|
||||||
|
&lights,
|
||||||
|
"Title Panel R",
|
||||||
|
"Title Panel G",
|
||||||
|
"Title Panel B",
|
||||||
|
"Side Panel R",
|
||||||
|
"Side Panel G",
|
||||||
|
"Side Panel B",
|
||||||
|
"Card Reader R",
|
||||||
|
"Card Reader G",
|
||||||
|
"Card Reader B",
|
||||||
|
"Joystick R",
|
||||||
|
"Joystick G",
|
||||||
|
"Joystick B",
|
||||||
|
"Button",
|
||||||
|
"IR LED"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return lights;
|
||||||
|
}
|
||||||
@@ -30,7 +30,27 @@ namespace games::bc {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Lights {
|
||||||
|
typedef enum {
|
||||||
|
TitlePanel_R,
|
||||||
|
TitlePanel_G,
|
||||||
|
TitlePanel_B,
|
||||||
|
SidePanel_R,
|
||||||
|
SidePanel_G,
|
||||||
|
SidePanel_B,
|
||||||
|
CardReader_R,
|
||||||
|
CardReader_G,
|
||||||
|
CardReader_B,
|
||||||
|
Joystick_R,
|
||||||
|
Joystick_G,
|
||||||
|
Joystick_B,
|
||||||
|
Button,
|
||||||
|
IrLed,
|
||||||
|
} bc_lights_t;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<Button> &get_buttons();
|
std::vector<Button> &get_buttons();
|
||||||
std::string get_buttons_help();
|
std::string get_buttons_help();
|
||||||
std::vector<Analog> &get_analogs();
|
std::vector<Analog> &get_analogs();
|
||||||
|
std::vector<Light> &get_lights();
|
||||||
}
|
}
|
||||||
@@ -301,6 +301,7 @@ namespace games {
|
|||||||
buttons.insert({ bc, bc::get_buttons() });
|
buttons.insert({ bc, bc::get_buttons() });
|
||||||
buttons_help.insert({ bc, bc::get_buttons_help() });
|
buttons_help.insert({ bc, bc::get_buttons_help() });
|
||||||
analogs.insert({ bc, bc::get_analogs() });
|
analogs.insert({ bc, bc::get_analogs() });
|
||||||
|
lights.insert({ bc, bc::get_lights() });
|
||||||
file_hints[bc].push_back({"game/bsac_app.exe"});
|
file_hints[bc].push_back({"game/bsac_app.exe"});
|
||||||
|
|
||||||
// ccj
|
// ccj
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
#include "hooks/devicehook.h"
|
#include "hooks/devicehook.h"
|
||||||
#include "hooks/libraryhook.h"
|
#include "hooks/libraryhook.h"
|
||||||
#ifdef SPICE64
|
#ifdef SPICE64
|
||||||
|
#include <mutex>
|
||||||
|
#include <psapi.h>
|
||||||
#include "hooks/graphics/nvapi_impl.h"
|
#include "hooks/graphics/nvapi_impl.h"
|
||||||
#endif
|
#endif
|
||||||
#include "hooks/graphics/nvapi_hook.h"
|
#include "hooks/graphics/nvapi_hook.h"
|
||||||
@@ -40,6 +42,9 @@ static decltype(RegEnumKeyA) *RegEnumKeyA_orig = nullptr;
|
|||||||
static decltype(RegOpenKeyA) *RegOpenKeyA_orig = nullptr;
|
static decltype(RegOpenKeyA) *RegOpenKeyA_orig = nullptr;
|
||||||
static decltype(RegOpenKeyExA) *RegOpenKeyExA_orig = nullptr;
|
static decltype(RegOpenKeyExA) *RegOpenKeyExA_orig = nullptr;
|
||||||
static decltype(RegQueryValueExA) *RegQueryValueExA_orig = nullptr;
|
static decltype(RegQueryValueExA) *RegQueryValueExA_orig = nullptr;
|
||||||
|
#ifdef SPICE64
|
||||||
|
static decltype(K32GetPerformanceInfo) *K32GetPerformanceInfo_orig = nullptr;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace games::sdvx {
|
namespace games::sdvx {
|
||||||
|
|
||||||
@@ -200,6 +205,35 @@ namespace games::sdvx {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SPICE64
|
#ifdef SPICE64
|
||||||
|
|
||||||
|
static BOOL WINAPI K32GetPerformanceInfo_hook(PPERFORMANCE_INFORMATION info, DWORD cb) {
|
||||||
|
if (info == nullptr) {
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
if (cb < sizeof(*info)) {
|
||||||
|
SetLastError(ERROR_BAD_LENGTH);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// store a cached copy of the first successful call to K32GetPerformanceInfo
|
||||||
|
static std::mutex cache_mutex;
|
||||||
|
static PERFORMANCE_INFORMATION cached {};
|
||||||
|
static bool cached_valid = false;
|
||||||
|
std::lock_guard<std::mutex> lock(cache_mutex);
|
||||||
|
if (!cached_valid) {
|
||||||
|
if (!K32GetPerformanceInfo_orig(info, cb)) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
cached = *info;
|
||||||
|
cached_valid = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// return the cached copy to avoid performance issues with the game calling this every frame
|
||||||
|
*info = cached;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static bool sdvx64_spam_remover(void *user, const std::string &data, logger::Style style, std::string &out) {
|
static bool sdvx64_spam_remover(void *user, const std::string &data, logger::Style style, std::string &out) {
|
||||||
if (data.empty() || data[0] != '[') {
|
if (data.empty() || data[0] != '[') {
|
||||||
return false;
|
return false;
|
||||||
@@ -534,6 +568,14 @@ namespace games::sdvx {
|
|||||||
if (is_valkyrie_model()) {
|
if (is_valkyrie_model()) {
|
||||||
sysutils::hook_EnumDisplayDevicesA();
|
sysutils::hook_EnumDisplayDevicesA();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// keep one real snapshot for the session instead of querying statistics every frame
|
||||||
|
K32GetPerformanceInfo_orig = detour::iat_try(
|
||||||
|
"K32GetPerformanceInfo", K32GetPerformanceInfo_hook, avs::game::DLL_INSTANCE);
|
||||||
|
if (K32GetPerformanceInfo_orig != nullptr) {
|
||||||
|
log_info("sdvx", "installed cached hook for K32GetPerformanceInfo");
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1485,6 +1485,9 @@ int main_implementation(int argc, char *argv[]) {
|
|||||||
if (options[launcher::Options::CCJMouseTrackballWithToggle].value_bool()) {
|
if (options[launcher::Options::CCJMouseTrackballWithToggle].value_bool()) {
|
||||||
games::ccj::MOUSE_TRACKBALL_USE_TOGGLE = true;
|
games::ccj::MOUSE_TRACKBALL_USE_TOGGLE = true;
|
||||||
}
|
}
|
||||||
|
if (options[launcher::Options::BCArgs].is_active()) {
|
||||||
|
games::bc::BC_INJECT_ARGS = options[launcher::Options::BCArgs].value_text();
|
||||||
|
}
|
||||||
if (options[launcher::Options::CCJArgs].is_active()) {
|
if (options[launcher::Options::CCJArgs].is_active()) {
|
||||||
games::ccj::CCJ_INJECT_ARGS = options[launcher::Options::CCJArgs].value_text();
|
games::ccj::CCJ_INJECT_ARGS = options[launcher::Options::CCJArgs].value_text();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2362,6 +2362,15 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = std::invoke([]()
|
|||||||
{"all", "basic + HID devices"},
|
{"all", "basic + HID devices"},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
c[launcher::Options::BCArgs] = {
|
||||||
|
.title = "BC Arguments Override",
|
||||||
|
.name = "bcargs",
|
||||||
|
.desc = "Command line arguments passed to the game.",
|
||||||
|
.type = OptionType::Text,
|
||||||
|
.setting_name = "",
|
||||||
|
.game_name = "Busou Shinki: Armored Princess Battle Conductor",
|
||||||
|
.category = "Advanced Game Options",
|
||||||
|
};
|
||||||
c[launcher::Options::QKSArgs] = {
|
c[launcher::Options::QKSArgs] = {
|
||||||
.title = "QKS Arguments Override",
|
.title = "QKS Arguments Override",
|
||||||
.name = "qksargs",
|
.name = "qksargs",
|
||||||
|
|||||||
@@ -241,6 +241,7 @@ namespace launcher {
|
|||||||
DisableAvsCache,
|
DisableAvsCache,
|
||||||
OutputPEB,
|
OutputPEB,
|
||||||
DumpSystemInfo,
|
DumpSystemInfo,
|
||||||
|
BCArgs,
|
||||||
QKSArgs,
|
QKSArgs,
|
||||||
CCJArgs,
|
CCJArgs,
|
||||||
CCJMouseTrackball,
|
CCJMouseTrackball,
|
||||||
|
|||||||
Reference in new issue
Block a user