Add CPU prioritization support for Windows

This commit is contained in:
Tres Finocchiaro
2015-01-14 14:33:21 -05:00
parent 030292cbad
commit d89b54d768
2 changed files with 18 additions and 0 deletions

View File

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

View File

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