- Force speed to 29 if playing ads
- Downgrade llvm to 12.0.0
This commit is contained in:
Arsenii Esenin 2022-01-07 04:29:22 +01:00
parent 42211ffa48
commit 4b4a3389eb
4 changed files with 11 additions and 10 deletions

@ -16,13 +16,13 @@ namespace bootstrap {
#ifdef _DEBUG
while ( !GetAsyncKeyState( VK_DELETE ) ) {
#else
#else
util::logger::warn( "press any key to close this console" );
_getwch( );
util::logger::detach( );
while ( true ) {
#endif
#endif
std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
}

@ -10,12 +10,13 @@ namespace hooks {
void* pthis, void* pedx,
spotify::structs::player_meta_t* player_meta,
spotify::structs::player_track_meta_t* track_meta,
int a4, int a5, int a6, int a7, int a8, int a9, int a10
double speed, int normalization, int urgency, int track_select_flag, int flag, int stream_type
) {
player_meta->m_should_skip = static_cast< std::uint32_t >( static_cast< bool >( strstr( track_meta->m_track_uri, "spotify:ad:" ) ) );
util::logger::info( "Playing %s | should_skip: %s", track_meta->m_track_uri, player_meta->m_should_skip ? "true" : "false" );
original::create_track( pthis, pedx, player_meta, track_meta, a4, a5, 8, a7, a8, a9, a10 );
if ( player_meta->m_should_skip )
speed = 29.0;
original::create_track( pthis, pedx, player_meta, track_meta, speed, normalization, urgency, track_select_flag, flag, stream_type );
}
}
}

@ -9,7 +9,7 @@ namespace hooks {
std::uintptr_t __cdecl debug_msg( std::uint32_t, std::uint32_t, const char* win, const char* flag, std::uint32_t size, std::uint32_t, const char* fmt, ... );
#endif
std::uintptr_t __cdecl get_ad( int a1, int a2 );
void __fastcall create_track( void* pthis, void* pedx, spotify::structs::player_meta_t* player_meta, spotify::structs::player_track_meta_t* track_meta, int a4, int a5, int a6, int a7, int a8, int a9, int a10 );
void __fastcall create_track( void* pthis, void* pedx, spotify::structs::player_meta_t* player_meta, spotify::structs::player_track_meta_t* track_meta, double speed, int normalization, int urgency, int track_select_flag, int flag, int stream_type );
}
namespace original {
#ifdef _DEBUG

@ -31,7 +31,7 @@
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<LLVMToolsVersion>13.0.0</LLVMToolsVersion>
<LLVMToolsVersion>12.0.0</LLVMToolsVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
@ -39,14 +39,14 @@
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<LLVMToolsVersion>13.0.0</LLVMToolsVersion>
<LLVMToolsVersion>12.0.0</LLVMToolsVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>ClangCL</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<LLVMToolsVersion>13.0.0</LLVMToolsVersion>
<LLVMToolsVersion>12.0.0</LLVMToolsVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
@ -54,7 +54,7 @@
<PlatformToolset>ClangCL</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<LLVMToolsVersion>13.0.0</LLVMToolsVersion>
<LLVMToolsVersion>12.0.0</LLVMToolsVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">