1
mirror of https://github.com/mpv-player/mpv synced 2024-11-07 01:47:00 +01:00
mpv/osdep
James Ross-Gowan 527911d2a2 win32: only attach to the console from mpv.com
Previously, mpv.exe used the --terminal option to decide whether to
attach to the parent process's console, which made it impossible to tell
whether mpv would attach to the console before the config files were
parsed. Instead, make mpv always attach to the console when launched
from the console wrapper (mpv.com) and never attach otherwise. This will
be useful for the next commit, which will use the presence of the
console to decide whether to use the pseudo-gui profile.

This change should also be an improvement in behavior. The old code
would attach to the parent process's console, regardless of whether it
was mpv.com or some other program like cmd.exe. This could be confusing,
since mpv.exe is marked as a Windows GUI program and shouldn't write
text to its parent process's console when launched directly. (See #768.)

Visual Studio does something similar with its devenv.com wrapper.
devenv.exe only attaches to the console when launched from devenv.com.
2015-04-11 14:34:33 +10:00
..
ar Kill all tabs 2014-04-13 18:03:01 +02:00
win32 win32: add native wrappers for pthread functions 2015-01-01 15:10:42 +01:00
atomics.h msg: use relaxed atomics for log level test 2015-03-02 19:09:31 +01:00
compiler.h Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
endian.h audio: drop swapped-endian audio formats 2014-09-23 23:09:25 +02:00
glob-win.c glob-win: support Unicode 2014-04-21 02:57:16 +02:00
io.c win32: use a platform-specific unicode entry-point 2015-04-11 14:27:25 +10:00
io.h win32: use a platform-specific unicode entry-point 2015-04-11 14:27:25 +10:00
macosx_application_objc.h cocoa: ignore first file open events from command line 2014-12-07 21:39:26 +01:00
macosx_application.h cocoa: use --idle when running inside bundle 2014-12-06 14:16:13 +01:00
macosx_application.m osx: terminate argv properly when arguments are removed 2015-03-06 11:31:05 +01:00
macosx_compat.h cocoa: fix compilation on OS X 10.8 2014-07-14 07:21:44 +02:00
macosx_events_objc.h cocoa: move handleFilesArray: to macosx_events 2014-08-06 09:31:58 +02:00
macosx_events.h cocoa: post keydown and keyup events without event monitor 2014-10-09 22:14:41 +02:00
macosx_events.m cocoa: silence -Wlogical-op-parentheses 2015-03-04 10:21:36 +01:00
macosx_versions.h cocoa: fix compilation on OS X 10.8 2014-07-14 07:21:44 +02:00
mpv.exe.manifest win32: fix/change application name 2015-02-09 20:44:09 +01:00
mpv.rc win32: fix/change application name 2015-02-09 20:44:09 +01:00
path-macosx.m config: use the same signature for win32/OSX specific path functions 2014-06-26 19:56:45 +02:00
path-win.c win32: change config path priorities 2014-10-23 10:51:51 +02:00
path.h config: use the same signature for win32/OSX specific path functions 2014-06-26 19:56:45 +02:00
semaphore_osx.c osdep/semaphore_osx.c: Include osdep/semaphore.h before #ifdef 2014-09-10 17:22:20 +09:00
semaphore.h osdep: hack to fix build with low quality pthreads-w32 headers 2014-09-20 04:18:40 +02:00
subprocess-posix.c osdep/subprocess-posix: remove __GLIBC__ guard 2015-02-03 14:34:52 -08:00
subprocess-win.c subprocess-win: clarify argument escaping logic 2015-03-24 15:53:36 +11:00
subprocess.h subprocess: minor cosmetic cleanup 2014-11-22 14:38:58 +01:00
terminal-unix.c terminal: always print to stderr with --no-input-terminal 2015-01-07 19:45:44 +01:00
terminal-win.c win32: only attach to the console from mpv.com 2015-04-11 14:34:33 +10:00
terminal.h win32: only attach to the console from mpv.com 2015-04-11 14:34:33 +10:00
threads.c osdep: potentially fix compilation on OpenBSD 2014-10-31 19:44:42 +01:00
threads.h Set thread name for debugging 2014-10-19 23:48:40 +02:00
timer-darwin.c Split mpvcore/ into common/, misc/, bstr/ 2013-12-17 02:39:45 +01:00
timer-linux.c timer: reduce ifdef headsplitting-factor 2014-03-09 16:58:00 +01:00
timer-win2.c win32: use monotonic clock on windows if possible 2015-01-19 19:01:08 +01:00
timer.c msg: add --log-file option 2015-01-26 11:31:02 +01:00
timer.h msg: add --log-file option 2015-01-26 11:31:02 +01:00
w32_keyboard.c w32: use the w32_common keymap in terminal-win too 2014-01-19 14:42:15 +01:00
w32_keyboard.h w32: use the w32_common keymap in terminal-win too 2014-01-19 14:42:15 +01:00
win32-console-wrapper.c win32: only attach to the console from mpv.com 2015-04-11 14:34:33 +10:00