mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-03 07:10:42 -07:00
sdvx: clean up valk cab check (#498)
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user