Update to spice2x-25-04-25 (pre-apply)

> broken commit
This commit is contained in:
[ ]
2025-05-07 00:25:31 +09:00
parent 04dee88276
commit c94de456b5
543 changed files with 78491 additions and 91698 deletions
+12 -1
View File
@@ -26,6 +26,14 @@ std::vector<Button> &games::popn::get_buttons() {
return buttons;
}
std::string games::popn::get_buttons_help() {
// keep to max 100 characters wide
return
" 2 4 6 8 \n"
" 1 3 5 7 9 "
;
}
std::vector<Light> &games::popn::get_lights() {
static std::vector<Light> lights;
@@ -86,7 +94,10 @@ std::vector<Light> &games::popn::get_lights() {
"Left Lamp 1",
"Left Lamp 2",
"Right Lamp 1",
"Right Lamp 2"
"Right Lamp 2",
"Woofer LED R",
"Woofer LED G",
"Woofer LED B"
);
}
+4
View File
@@ -79,10 +79,14 @@ namespace games::popn {
LeftLamp2,
RightLamp1,
RightLamp2,
WooferLED_R,
WooferLED_G,
WooferLED_B,
};
}
// getters
std::vector<Button> &get_buttons();
std::string get_buttons_help();
std::vector<Light> &get_lights();
}
+26 -1
View File
@@ -4,6 +4,7 @@
#include <cstring>
#include "rawinput/rawinput.h"
#include "util/detour.h"
#include "util/fileutils.h"
#include "util/libutils.h"
#include "util/utils.h"
#include "cfg/button.h"
@@ -167,7 +168,26 @@ namespace games::popn {
return 0;
}
static int __cdecl usbSetExtIo() {
static int __cdecl usbSetExtIo(uint32_t rgb_bits) {
// get lights
auto &lights = get_lights();
// bit scan
static const size_t mapping[] = {
Lights::WooferLED_R,
Lights::WooferLED_G,
Lights::WooferLED_B,
};
for (size_t i = 0; i < 3; i++) {
float value = (rgb_bits & (1 << (i + 1)));
GameAPI::Lights::writeLight(RI_MGR, lights.at(mapping[i]), value);
}
// flush output
RI_MGR->devices_flush_output();
return 0;
}
@@ -229,6 +249,11 @@ namespace games::popn {
void POPNGame::pre_attach() {
Game::pre_attach();
// only needed for older versions (19-21, inclusive) but create them anyway since 21 and above are all M39
fileutils::dir_create_recursive_log("popn", "dev\\raw\\bookkeeping");
fileutils::dir_create_recursive_log("popn", "dev\\raw\\ranking");
fileutils::dir_create_recursive_log("popn", "dev\\raw\\settings");
// load without resolving references
// makes game not trigger DLLMain which results in an error due to missing EZUSB device
LoadLibraryExW((MODULE_PATH / "ezusb.dll").c_str(), nullptr, DONT_RESOLVE_DLL_REFERENCES);