mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 04:58:06 +00:00
win32: remove check for SetPriorityClass()
This function is always available, which is reflected by the fact that the configure check doesn't actually bother to check for its existence. Instead, MinGW and Cygwin imply it. The check was probably "needed" when the priority code was still in a separate source file. Remove the check, and use _WIN32 for testing for the win32 API (in a bunch of other places too).
This commit is contained in:
parent
6f5e5e6a9e
commit
6b24cb2756
@ -29,7 +29,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if HAVE_PRIORITY
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
@ -111,7 +111,7 @@ const m_option_t mp_opts[] = {
|
||||
OPT_FLAG("msg-color", msg_color, CONF_GLOBAL | CONF_PRE_PARSE),
|
||||
OPT_FLAG("msg-module", msg_module, CONF_GLOBAL),
|
||||
OPT_FLAG("msg-time", msg_time, CONF_GLOBAL),
|
||||
#if HAVE_PRIORITY
|
||||
#ifdef _WIN32
|
||||
OPT_CHOICE("priority", w32_priority, 0,
|
||||
({"no", 0},
|
||||
{"realtime", REALTIME_PRIORITY_CLASS},
|
||||
|
@ -63,7 +63,7 @@
|
||||
#include "command.h"
|
||||
#include "screenshot.h"
|
||||
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
||||
#ifndef BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE
|
||||
@ -287,7 +287,7 @@ static void osdep_preinit(int *p_argc, char ***p_argv)
|
||||
mp_get_converted_argv(p_argc, p_argv);
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||
#ifdef _WIN32
|
||||
// stop Windows from showing all kinds of annoying error dialogs
|
||||
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
|
||||
|
||||
@ -525,7 +525,7 @@ int mpv_main(int argc, char *argv[])
|
||||
exit_player(mpctx, EXIT_NONE);
|
||||
}
|
||||
|
||||
#if HAVE_PRIORITY
|
||||
#ifdef _WIN32
|
||||
if (opts->w32_priority > 0)
|
||||
SetPriorityClass(GetCurrentProcess(), opts->w32_priority);
|
||||
#endif
|
||||
|
5
wscript
5
wscript
@ -185,11 +185,6 @@ iconv support use --disable-iconv.",
|
||||
'desc': 'w32/dos paths',
|
||||
'deps_any': [ 'os-win32', 'os-cygwin' ],
|
||||
'func': check_true
|
||||
}, {
|
||||
'name': 'priority',
|
||||
'desc': 'w32 priority API',
|
||||
'deps_any': [ 'os-win32', 'os-cygwin'],
|
||||
'func': check_true
|
||||
}, {
|
||||
'name': '--waio',
|
||||
'desc': 'libwaio for win32',
|
||||
|
Loading…
Reference in New Issue
Block a user