v1.0.1
- Add way to close unspotify console
This commit is contained in:
parent
272f88fb76
commit
d9315980e7
@ -67,11 +67,16 @@ namespace util {
|
|||||||
MessageBoxA( NULL, buf, "Unspotify", MB_OK );
|
MessageBoxA( NULL, buf, "Unspotify", MB_OK );
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void startup( ) {
|
__forceinline void startup( ) {
|
||||||
AllocConsole( );
|
::AllocConsole( );
|
||||||
freopen_s( reinterpret_cast< FILE** >( stdin ), "CONIN$", "r", stdin );
|
freopen_s( reinterpret_cast< FILE** >( stdin ), "CONIN$", "r", stdin );
|
||||||
freopen_s( reinterpret_cast< FILE** >( stdout ), "CONOUT$", "w", stdout );
|
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 "../hooks/hooks.h"
|
||||||
#include "shared/logo.h"
|
#include "shared/logo.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
namespace bootstrap {
|
namespace bootstrap {
|
||||||
DWORD __stdcall _initial_routine( HANDLE ) {
|
DWORD __stdcall _initial_routine( HANDLE ) {
|
||||||
@ -11,6 +14,10 @@ namespace bootstrap {
|
|||||||
spotify::init( );
|
spotify::init( );
|
||||||
hooks::init( );
|
hooks::init( );
|
||||||
|
|
||||||
|
util::logger::warn( "press any key to close this console" );
|
||||||
|
_getwch( );
|
||||||
|
util::logger::detach( );
|
||||||
|
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
for ( ;;) {
|
for ( ;;) {
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user