Skip to content

Commit

Permalink
Fixed for latest versions of rekordbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Apr 10, 2023
1 parent d122d51 commit c813d55
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Launcher/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <string>

// The current version of RBSE
#define RBSE_VERSION "3.7"
#define RBSE_VERSION "3.8"
// maximum length of output file names
#define MAX_OUTFILE_NAME_LEN 64
// maximum length of output formats
Expand Down
3 changes: 3 additions & 0 deletions Launcher/Versions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ using namespace std;
// list of supported versions
version_path versions[] = {
// Friendly name Default installation path
{ "Rekordbox 6.7.0", "C:\\Program Files\\Pioneer\\rekordbox 6.7.0\\rekordbox.exe" },
{ "Rekordbox 6.6.11", "C:\\Program Files\\Pioneer\\rekordbox 6.6.11\\rekordbox.exe" },
{ "Rekordbox 6.6.10", "C:\\Program Files\\Pioneer\\rekordbox 6.6.10\\rekordbox.exe" },
{ "Rekordbox 6.6.4", "C:\\Program Files\\Pioneer\\rekordbox 6.6.4\\rekordbox.exe" },
// Less than 6.6.4 no longer supported in this build
//{ "Rekordbox 6.6.3", "C:\\Program Files\\Pioneer\\rekordbox 6.6.3\\rekordbox.exe" },
Expand Down
3 changes: 3 additions & 0 deletions Module/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const char *rbver_strings[RBVER_COUNT] = {
"6.6.2", // RBVER_662
"6.6.3", // RBVER_663
"6.6.4", // RBVER_664
"6.6.10", // RBVER_6610
"6.6.11", // RBVER_6611
"6.7.0", // RBVER_670
};

// global config object
Expand Down
3 changes: 3 additions & 0 deletions Module/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ typedef enum rbox_version_enum

// only supporting this version+
RBVER_664, // 6.6.4
RBVER_6610, // 6.6.10
RBVER_6611, // 6.6.11
RBVER_670, // 6.7.0

RBVER_COUNT // the number of versions supported
} rbox_version_t;
Expand Down
14 changes: 9 additions & 5 deletions Module/DllMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
// pause on the entrypoint and inject the module then resume rekordbox
switch (fdwReason) {
case DLL_PROCESS_ATTACH:
// hook the uimanager initialization function to wait for rekordbox to initialize
if (!hook_uimanager_init()) {
MessageBox(NULL, "Failed to hook initialization", "Error", 0);
return FALSE;
}
if (!initialize_log()) {
return false;
}
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)mainThread, NULL, 0, NULL);
//// hook the uimanager initialization function to wait for rekordbox to initialize
//if (!hook_uimanager_init()) {
// MessageBox(NULL, "Failed to hook initialization", "Error", 0);
// return FALSE;
//}
break;
case DLL_THREAD_ATTACH:
break;
Expand Down
9 changes: 9 additions & 0 deletions Module/LoadFileHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
// djplay::UiPlayer::eventLoadFile
#define EVENT_LOAD_FILE_SIG "4C 89 4C 24 20 4C 89 44 24 18 48 89 54 24 10 48 89 4C 24 08 55 53 56 57 41 54 41 55 41 56 41 57 48 8B EC 48 83 EC 78 48 C7 45 D8 FE FF FF FF 48 8B F1 33 FF 83 BD A8 00 00 00 01"

// new djplay::UiPlayer::eventLoadFile 7th call above str 'EXPORT_DECKLOAD'
#define EVENT_LOAD_FILE_SIG_670 "4C 89 4C 24 20 4C 89 44 24 18 48 89 54 24 10 48 89 4C 24 08 55 53 56 57 41 54 41 55 41 56 41 57 48 8D 6C 24 F9"

using namespace std;

Hook g_load_file_hook;
Expand Down Expand Up @@ -72,8 +75,14 @@ bool hook_load_file()
uintptr_t lf_addr = 0;
switch (config.version) {
default: // Unfortunately after 6.6.4 this changed and I don't want to go back and do older verisons
case RBVER_664:
case RBVER_6610:
case RBVER_6611:
lf_addr = sig_scan(EVENT_LOAD_FILE_SIG);
break;
case RBVER_670:
lf_addr = sig_scan(EVENT_LOAD_FILE_SIG_670);
break;
};
if (!lf_addr) {
error("Failed to locate LoadFile");
Expand Down

0 comments on commit c813d55

Please sign in to comment.