Update to spice2x-25-04-25 (pre-apply)
> broken commit
This commit is contained in:
+26
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user