From dd7c0bb40f660bc97b57e4d106046a26e40d5d8e Mon Sep 17 00:00:00 2001 From: CrazyRedMachine Date: Wed, 23 Aug 2023 20:52:51 +0200 Subject: [PATCH] fix default bpm 0 --- popnhax/dllmain.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/popnhax/dllmain.cc b/popnhax/dllmain.cc index d76a254..963d537 100644 --- a/popnhax/dllmain.cc +++ b/popnhax/dllmain.cc @@ -4007,13 +4007,14 @@ void hook_read_hispeed() __asm("push eax\n"); __asm("push ecx\n"); __asm("push edx\n"); - if ( g_bypass_hispeed ) //bypass for mystery BPM and soflan songs (to avoid hi-speed being locked since target won't change) - __asm("jmp leave_read_hispeed\n"); - + __asm("mov %0, word ptr [ebp+0xA1A]\n":"=a"(g_low_bpm): :); __asm("mov %0, word ptr [ebp+0xA1C]\n":"=a"(g_hi_bpm): :); __asm("mov %0, byte ptr [ebp+0xA1E]\n":"=a"(g_mystery_bpm): :); + if ( g_bypass_hispeed || g_target_bpm == 0 ) //bypass for mystery BPM and soflan songs (to avoid hi-speed being locked since target won't change) + __asm("jmp leave_read_hispeed\n"); + g_hispeed_double = (double)g_target_bpm / (double)(*g_base_bpm_ptr/10.0); g_hispeed = (uint32_t)(g_hispeed_double+0.5); //rounding to nearest if (g_hispeed > 0x64) g_hispeed = 0x0A;