sdvx: clean up valk cab check (#498)

This commit is contained in:
bicarus
2026-01-04 19:49:55 -08:00
committed by GitHub
parent 1354d63b85
commit 7f281a50c5
6 changed files with 20 additions and 28 deletions
+3 -5
View File
@@ -2,7 +2,6 @@
#include <external/robin_hood.h>
#include "avs/game.h"
#include "games/shared/lcdhandle.h"
#include "games/io.h"
#include "hooks/audio/audio.h"
@@ -331,9 +330,8 @@ namespace games::sdvx {
}
#ifdef SPICE64 // SDVX5+ specific code
this->VALKYRIE_MODEL = avs::game::SPEC[0] == 'G' || avs::game::SPEC[0] == 'H';
// check -monitor + UFC mode
if (!GRAPHICS_WINDOWED && D3D9_ADAPTER.has_value() && this->VALKYRIE_MODEL) {
if (!GRAPHICS_WINDOWED && D3D9_ADAPTER.has_value() && is_valkyrie_model()) {
SHOW_VM_MONITOR_WARNING = true;
log_warning(
"sdvx",
@@ -370,7 +368,7 @@ namespace games::sdvx {
#ifdef SPICE64 // SDVX5+ specific code
// LCD handle
if (!this->VALKYRIE_MODEL) {
if (!is_valkyrie_model()) {
devicehook_init();
devicehook_add(new games::shared::LCDHandle());
}
@@ -409,7 +407,7 @@ namespace games::sdvx {
nvapi_hook::initialize(avs::game::DLL_INSTANCE);
}
if (this->VALKYRIE_MODEL) {
if (is_valkyrie_model()) {
// hook touch window
// in windowed mode, game can accept mouse input on the second screen
if (!NATIVETOUCH && !GRAPHICS_WINDOWED) {
+8 -5
View File
@@ -4,6 +4,7 @@
#include <optional>
#include <cstdint>
#include "avs/game.h"
#include "games/game.h"
namespace games::sdvx {
@@ -25,6 +26,13 @@ namespace games::sdvx {
// states
extern bool SHOW_VM_MONITOR_WARNING;
static inline bool is_valkyrie_model() {
return (
avs::game::is_model("KFC") &&
(avs::game::SPEC[0] == 'G' || avs::game::SPEC[0] == 'H')
);
}
class SDVXGame : public games::Game {
public:
SDVXGame();
@@ -33,11 +41,6 @@ namespace games::sdvx {
virtual void post_attach() override;
virtual void detach() override;
private:
// don't be tempted to make this into a public or a global variable
// various modules need to check if VM mode is active and they should
// not depend on the fact that SDVX module is active (since it can be
// inactive on cabs or partial I/O setup)
bool VALKYRIE_MODEL = false;
void detect_sound_output_device();
};
}