diff options
author | komh <komh@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-03-04 12:55:30 +0000 |
---|---|---|
committer | komh <komh@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-03-04 12:55:30 +0000 |
commit | 66278a55ec69be0c4acc8650926f634ebc7f3f9e (patch) | |
tree | e18a2c8cffc108437576fd3a00674ee597aa97c0 /osdep/priority.c | |
parent | 6cf92cd32a416ab6fd4741983f0b1d989f6e7158 (diff) | |
download | mpv-66278a55ec69be0c4acc8650926f634ebc7f3f9e.tar.bz2 mpv-66278a55ec69be0c4acc8650926f634ebc7f3f9e.tar.xz |
1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
2. Define SetPriorityClass() and GetCurrentProcess() in osdep.h
3. Include osdep.h in priority.c
This removes OS2-platform check in priority.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30828 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'osdep/priority.c')
-rw-r--r-- | osdep/priority.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/osdep/priority.c b/osdep/priority.c index 7d3733e9a7..2f9bafe12b 100644 --- a/osdep/priority.c +++ b/osdep/priority.c @@ -20,23 +20,11 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifdef __OS2__ - -#define INCL_DOS -#include <os2.h> - -#define REALTIME_PRIORITY_CLASS MAKESHORT(0, PRTYC_TIMECRITICAL) -#define HIGH_PRIORITY_CLASS MAKESHORT(PRTYD_MAXIMUM, PRTYC_REGULAR) -#define ABOVE_NORMAL_PRIORITY_CLASS MAKESHORT(PRTYD_MAXIMUM / 2, PRTYC_REGULAR) -#define NORMAL_PRIORITY_CLASS MAKESHORT(0, PRTYC_REGULAR) -#define BELOW_NORMAL_PRIORITY_CLASS MAKESHORT(PRTYD_MAXIMUM, PRTYC_IDLETIME) -#define IDLE_PRIORITY_CLASS MAKESHORT(0, PRTYC_IDLETIME) - -#else +#include "osdep.h" +#ifdef _WIN32 #include <windows.h> - -#endif /* __OS2__ */ +#endif #include <string.h> @@ -76,13 +64,6 @@ void set_priority(void) mp_msg(MSGT_CPLAYER, MSGL_STATUS, MSGTR_SettingProcessPriority, priority_presets_defs[i].name); -#ifdef __OS2__ - DosSetPriority(PRTYS_PROCESS, - HIBYTE(priority_presets_defs[i].prio), - LOBYTE(priority_presets_defs[i].prio), - 0); -#else SetPriorityClass(GetCurrentProcess(), priority_presets_defs[i].prio); -#endif } } |