fix default bpm 0

This commit is contained in:
CrazyRedMachine 2023-08-23 20:52:51 +02:00
parent bec2d2a39f
commit dd7c0bb40f

View File

@ -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;