iidx,sdvx: disable subscreen overlay if -monitor is in use (#471)

## Link to GitHub Issue, if one exists
#345 

## Description of change
If TDJ / VM mode is active AND user is enabled `-monitor` option (and
the value isn't 0, the primary monitor)

then disable the subscreen overlay, show an error message instead.

We're doing this because both games cannot accept emulated touch input
if `-monitor` option is in use. There is not much point in displaying
the second screen's image, other than to REALLY confuse people when
nothing happens when they click on it.

## Testing
Tested both games with `-monitor`.
This commit is contained in:
bicarus-dev
2025-12-24 17:35:15 -08:00
committed by GitHub
parent 064031bc12
commit 6cd212aac2
8 changed files with 30 additions and 14 deletions
+6 -9
View File
@@ -52,6 +52,7 @@ namespace games::sdvx {
std::optional<std::string> ASIO_DRIVER = std::nullopt;
// states
bool SHOW_VM_MONITOR_WARNING = false;
static HKEY real_asio_reg_handle = nullptr;
static HKEY real_asio_device_reg_handle = nullptr;
@@ -295,12 +296,10 @@ namespace games::sdvx {
}
#ifdef SPICE64 // SDVX5+ specific code
bool isValkyrieCabinetMode = avs::game::SPEC[0] == 'G' || avs::game::SPEC[0] == 'H';
auto options = games::get_options(eamuse_get_game());
this->VALKYRIE_MODEL = avs::game::SPEC[0] == 'G' || avs::game::SPEC[0] == 'H';
// check -monitor + UFC mode
if (!GRAPHICS_WINDOWED &&
options->at(launcher::Options::DisplayAdapter).is_active() &&
isValkyrieCabinetMode) {
if (!GRAPHICS_WINDOWED && D3D9_ADAPTER.has_value() && this->VALKYRIE_MODEL) {
SHOW_VM_MONITOR_WARNING = true;
log_warning(
"sdvx",
"\n\n!!! using -monitor option with VM mode is NOT recommended due to !!!\n"
@@ -330,10 +329,9 @@ namespace games::sdvx {
Game::attach();
#ifdef SPICE64 // SDVX5+ specific code
bool isValkyrieCabinetMode = avs::game::SPEC[0] == 'G' || avs::game::SPEC[0] == 'H';
// LCD handle
if (!isValkyrieCabinetMode) {
if (!this->VALKYRIE_MODEL) {
devicehook_init();
devicehook_add(new games::shared::LCDHandle());
}
@@ -372,8 +370,7 @@ namespace games::sdvx {
nvapi_hook::initialize(avs::game::DLL_INSTANCE);
}
// check for Valkyrie cabinet mode
if (isValkyrieCabinetMode) {
if (this->VALKYRIE_MODEL) {
// hook touch window
// in windowed mode, game can accept mouse input on the second screen
if (!NATIVETOUCH && !GRAPHICS_WINDOWED) {