mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
4b7f68f920
## Link to GitHub Issue or related Pull Request, if one exists #730 ## Description of change Flip the option - enable the Realtek hack by default, unless the user chooses not to. ## Testing Tested ASIO path and WASAPI path. WASAPI path should be unaffected as the game just picks the default audio device.
63 lines
1.7 KiB
C++
63 lines
1.7 KiB
C++
#pragma once
|
|
|
|
#include <optional>
|
|
|
|
#include <windows.h>
|
|
#include <mmreg.h>
|
|
|
|
#include "avs/game.h"
|
|
#include "games/game.h"
|
|
#include "util/socd_cleaner.h"
|
|
|
|
namespace games::gitadora {
|
|
|
|
// settings
|
|
extern bool TWOCHANNEL;
|
|
extern std::optional<unsigned int> CAB_TYPE;
|
|
extern bool P1_LEFTY;
|
|
extern bool P2_LEFTY;
|
|
extern std::optional<std::string> SUBSCREEN_OVERLAY_SIZE;
|
|
extern std::optional<socd::SocdAlgorithm> PICK_ALGO;
|
|
extern std::optional<uint8_t> ARENA_WINDOW_COUNT;
|
|
extern std::optional<std::string> ASIO_DRIVER;
|
|
extern bool ALLOW_REALTEK_AUDIO;
|
|
|
|
class GitaDoraGame : public games::Game {
|
|
public:
|
|
GitaDoraGame();
|
|
virtual void pre_attach() override;
|
|
virtual void attach() override;
|
|
};
|
|
|
|
void fix_audio_channel_mask(WAVEFORMATEX *format);
|
|
|
|
static inline bool is_drum() {
|
|
return (
|
|
avs::game::is_model({ "J32", "K32", "L32" }) ||
|
|
(avs::game::is_model("M32") && (avs::game::SPEC[0] == 'B' || avs::game::SPEC[0] == 'D'))
|
|
);
|
|
}
|
|
static inline bool is_guitar() {
|
|
return (
|
|
avs::game::is_model({ "J33", "K33", "L33" }) ||
|
|
(avs::game::is_model("M32") && (avs::game::SPEC[0] == 'A' || avs::game::SPEC[0] == 'C'))
|
|
);
|
|
}
|
|
|
|
static inline bool is_arena_model() {
|
|
return (
|
|
avs::game::is_model("M32") &&
|
|
(avs::game::SPEC[0] == 'C' || avs::game::SPEC[0] == 'D')
|
|
);
|
|
}
|
|
|
|
static inline bool is_player_lefty(size_t player) {
|
|
if (player == 0) {
|
|
return P1_LEFTY;
|
|
} else if (player == 1) {
|
|
return P2_LEFTY;
|
|
}
|
|
return false;
|
|
}
|
|
}
|