1
0
mirror of synced 2024-11-23 22:51:02 +01:00
This commit is contained in:
BroGamer 2022-10-22 09:40:46 +13:00
parent 8c07fae935
commit 0bf2d745e1
3 changed files with 11 additions and 15 deletions

View File

@ -16,6 +16,7 @@ PreInit () {
WRITE_MEMORY (ASLR (0x1400239C0, handle), u8, 0xC3); // Stop error
if (readConfigBool (config, "unlock_songs", true)) WRITE_MEMORY (ASLR (0x140314E8D, handle), u8, 0xB0, 0x01); // Unlock songs
if (readConfigBool (config, "shared_audio", true)) WRITE_MEMORY (ASLR (0x140692E17, handle), u8, 0xEB); // Shared audio
if (!readConfigBool (config, "vsync", false)) WRITE_MEMORY (ASLR (0x140517339, handle), u8, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x90); // Disable VSync
// Remove song limit
WRITE_MEMORY (ASLR (0x140313726, handle), i32, 9000);
// Remove for with server
@ -30,7 +31,6 @@ PreInit () {
WRITE_MEMORY (ASLR (0x140306893, handle), i32, 9000);
WRITE_MEMORY (ASLR (0x14030698B, handle), i32, 9000);
WRITE_MEMORY (ASLR (0x140313666, handle), i32, 9000);
WRITE_MEMORY (ASLR (0x140313726, handle), i32, 9000);
WRITE_MEMORY (ASLR (0x1403139F4, handle), i32, 9000);
WRITE_MEMORY (ASLR (0x140313B04, handle), i32, 9000);
WRITE_MEMORY (ASLR (0x140313C24, handle), i32, 9000);
@ -56,12 +56,11 @@ PreInit () {
WRITE_MEMORY (ASLR (0x140314F46, handle), i32, 9000);
WRITE_MEMORY (ASLR (0x140314F97, handle), i32, 9000);
if (!readConfigBool (config, "vsync", false)) WRITE_MEMORY (ASLR (0x140517339, handle), u8, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x90); // Disable VSync
// Save settings cross session without F:/ and G:/ drive
WRITE_MEMORY (ASLR (0x140B5C528, handle), u8, "./Setting1.bin");
WRITE_MEMORY (ASLR (0x140B5C538, handle), u8, "./Setting2.bin");
WRITE_MEMORY (ASLR (0x140B5C528, handle), char, "./Setting1.bin");
WRITE_MEMORY (ASLR (0x140B5C538, handle), char, "./Setting2.bin");
// Move F:/ files to current directory
WRITE_MEMORY (ASLR (0x140B1B4B0, handle), u8, "./");
WRITE_MEMORY (ASLR (0x140B1B4B0, handle), char, "./");
WRITE_MEMORY (ASLR (0x14001C941, handle), u8, 0x02);
// Patch TLS v1.0 to v1.2
WRITE_MEMORY (ASLR (0x14044b1a9, handle), u8, 0x10);
@ -71,10 +70,9 @@ PreInit () {
i32 windowResX = readConfigInt (windowResSection, "x", 0);
i32 windowResY = readConfigInt (windowResSection, "y", 0);
if (windowResX > 0 && windowResY > 0) {
WRITE_MEMORY (ASLR (0x14035FC5B, handle), u32, windowResX);
WRITE_MEMORY (ASLR (0x14035FC62, handle), u32, windowResY);
WRITE_MEMORY (ASLR (0x14035FC5B, handle), i32, windowResX);
WRITE_MEMORY (ASLR (0x14035FC62, handle), i32, windowResY);
}
toml_free (windowResSection);
}
toml_free (config);

View File

@ -73,10 +73,8 @@ printColour (int colour, const char *format, ...) {
if (consoleHandle == 0) consoleHandle = GetStdHandle (STD_OUTPUT_HANDLE);
char buffer[255];
vsprintf (buffer, format, args);
SetConsoleTextAttribute (consoleHandle, colour);
printf ("%s", buffer);
vprintf (format, args);
SetConsoleTextAttribute (consoleHandle, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED);
va_end (args);

View File

@ -160,6 +160,7 @@ InitializePoll (void *DivaWindowHandle) {
if (SDL_GameControllerAddMappingsFromFile (configPath ("gamecontrollerdb.txt")) == -1)
printError ("%s (): Cannot read gamecontrollerdb.txt\n", __func__);
SDL_GameControllerEventState (SDL_ENABLE);
SDL_JoystickEventState (SDL_ENABLE);
for (int i = 0; i < SDL_NumJoysticks (); i++) {
if (!SDL_IsGameController (i)) continue;
@ -172,7 +173,6 @@ InitializePoll (void *DivaWindowHandle) {
}
controllers[i] = controller;
break;
}
window = SDL_CreateWindowFrom (DivaWindowHandle);