summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index 19cdd0daa8..55339a2e7e 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -88,6 +88,10 @@ int verbose=0;
int identify=0;
int quiet=0;
+#ifdef WIN32
+char * proc_priority=NULL;
+#endif
+
#define ABS(x) (((x)>=0)?(x):(-(x)))
#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))
@@ -1145,6 +1149,18 @@ int gui_no_filename=0;
}
}
+#ifdef WIN32
+ if(proc_priority){
+ int i;
+ for(i=0; priority_presets_defs[i].name; i++){
+ if(strcasecmp(priority_presets_defs[i].name, proc_priority) == 0)
+ break;
+ }
+ mp_msg(MSGT_CPLAYER,MSGL_STATUS,"Setting process priority: %s\n",
+ priority_presets_defs[i].name);
+ SetPriorityClass(GetCurrentProcess(), priority_presets_defs[i].prio);
+ }
+#endif
#ifndef HAVE_NEW_GUI
if(use_gui){
mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoGui);