Add CPU prioritization support for Windows
This commit is contained in:
@@ -1877,6 +1877,13 @@ int main( int _argc, char * * _argv )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
if( !SetPriorityClass( GetCurrentProcess(), HIGH_PRIORITY_CLASS ) )
|
||||
{
|
||||
printf( "Notice: could not set high priority.\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
// constructor automatically will process messages until it receives
|
||||
// a IdVstLoadPlugin message and processes it
|
||||
__plugin = new RemoteVstPlugin( atoi( _argv[1] ), atoi( _argv[2] ) );
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
#include <QPainter>
|
||||
#include <QSplashScreen>
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_HAVE_SCHED_H
|
||||
#include <sched.h>
|
||||
#endif
|
||||
@@ -422,6 +426,13 @@ int main( int argc, char * * argv )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
if( !SetPriorityClass( GetCurrentProcess(), HIGH_PRIORITY_CLASS ) )
|
||||
{
|
||||
printf( "Notice: could not set high priority.\n" );
|
||||
}
|
||||
#endif
|
||||
|
||||
if( render_out.isEmpty() )
|
||||
{
|
||||
new GuiApplication();
|
||||
|
||||
Reference in New Issue
Block a user