mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-05 08:10:40 -07:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user