sdvx: option to disable Live2D (#777)

## Link to GitHub Issue or related Pull Request, if one exists
n/a

## Description of change
Adds an option to disable Live2D. Can be disabled everywhere, or just
during a song.

## Testing
Tested EG final and recent Nabla.
This commit is contained in:
bicarus
2026-06-27 02:34:19 -07:00
committed by GitHub
parent db7defff5a
commit 3fdb369128
11 changed files with 378 additions and 2 deletions
+28
View File
@@ -1,5 +1,6 @@
#pragma once
#include <atomic>
#include <string>
#include <vector>
#include <optional>
@@ -27,6 +28,33 @@ enum graphics_dx9on12_state {
DX9ON12_FORCE_ON,
};
// SDVX Live2D suppression policy. the mode comes from the launcher
// option; the in-gameplay flag is maintained by the SDVX scene-detection hook in
// games/sdvx (which does not require the SDVX game module to be enabled). the
// d3d9 backend reads graphics_sdvx_live2d_should_skip() on every draw.
// only the Live2D-capable SDVX versions are 64-bit, so the whole feature is
// compiled out of 32-bit builds.
#ifdef SPICE64
enum class SdvxLive2dMode {
Off, // leave Live2D untouched (default)
Always, // always skip Live2D draws (also removes the menu navigator)
InGame, // skip Live2D draws only during a song
};
extern SdvxLive2dMode GRAPHICS_SDVX_LIVE2D_MODE;
extern std::atomic<bool> GRAPHICS_SDVX_LIVE2D_IN_GAMEPLAY;
inline bool graphics_sdvx_live2d_should_skip() {
switch (GRAPHICS_SDVX_LIVE2D_MODE) {
case SdvxLive2dMode::Always:
return true;
case SdvxLive2dMode::InGame:
return GRAPHICS_SDVX_LIVE2D_IN_GAMEPLAY.load(std::memory_order_relaxed);
default:
return false;
}
}
#endif // SPICE64
// flag settings
extern bool GRAPHICS_CAPTURE_CURSOR;
extern bool GRAPHICS_LOG_HRESULT;