summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-04-02 18:29:16 +0000
committerfaust3 <faust3@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-04-02 18:29:16 +0000
commit14ecebe920e68f12f6e882866f227c236c388502 (patch)
treeae5cdc0239e61c4ec8824f97b38f95e3012ccf72 /mplayer.c
parenta97a94b9294c7434afb45dd687a85ac256058e58 (diff)
downloadmpv-14ecebe920e68f12f6e882866f227c236c388502.tar.bz2
mpv-14ecebe920e68f12f6e882866f227c236c388502.tar.xz
windows priority support patch by Rune Petersen <runner at mail.tele.dk> with the freedom to shoot yourself in the foot
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15043 b3059339-0415-0410-9bf9-f77b7e298cf2
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);