forked from dg/Unspotify
parent
272f88fb76
commit
d9315980e7
|
@ -67,11 +67,16 @@ namespace util {
|
|||
MessageBoxA( NULL, buf, "Unspotify", MB_OK );
|
||||
}
|
||||
|
||||
inline void startup( ) {
|
||||
AllocConsole( );
|
||||
__forceinline void startup( ) {
|
||||
::AllocConsole( );
|
||||
freopen_s( reinterpret_cast< FILE** >( stdin ), "CONIN$", "r", stdin );
|
||||
freopen_s( reinterpret_cast< FILE** >( stdout ), "CONOUT$", "w", stdout );
|
||||
SetConsoleTitleA( "Unspotify" );
|
||||
::SetConsoleTitleA( "Unspotify" );
|
||||
}
|
||||
|
||||
__forceinline void detach( ) {
|
||||
::ShowWindow( ::GetConsoleWindow( ), SW_HIDE );
|
||||
::FreeConsole( );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
#include "../hooks/hooks.h"
|
||||
#include "shared/logo.h"
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
namespace bootstrap {
|
||||
DWORD __stdcall _initial_routine( HANDLE ) {
|
||||
|
@ -11,6 +14,10 @@ namespace bootstrap {
|
|||
spotify::init( );
|
||||
hooks::init( );
|
||||
|
||||
util::logger::warn( "press any key to close this console" );
|
||||
_getwch( );
|
||||
util::logger::detach( );
|
||||
|
||||
#ifndef _DEBUG
|
||||
for ( ;;) {
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue