summaryrefslogtreecommitdiffstats
path: root/osdep/getch2-win.c
Commit message (Collapse)AuthorAgeFilesLines
* Prefix keycode defines with MP_wm42013-02-121-14/+14
| | | | | | | | | | Do this to reduce conflicts with <linux/input.h>, which contains some conflicting defines. This changes the meaning of MP_KEY_DOWN: KEY_DOWN is renamed to MP_KEY_DOWN (cursor down key) MP_KEY_DOWN is renamed to MP_KEY_STATE_DOWN (modifier for key down state)
* mp_msg, getch2: unix tty background supportRudolf Polzer2013-01-231-0/+3
| | | | | | | | Now, when backgrounded, mpv plays and outputs messages to stdout, but statusline is not output. Background<->foreground transitions are detected by signals and polling the process groups.
* Rename directories, move files (step 2 of 2)wm42012-11-121-3/+3
| | | | | | | | | | | | Finish renaming directories and moving files. Adjust all include statements to make the previous commit compile. The two commits are separate, because git is bad at tracking renames and content changes at the same time. Also take this as an opportunity to remove the separation between "common" and "mplayer" sources in the Makefile. ("common" used to be shared between mplayer and mencoder.)
* mp_msg: remove filename_recodewm42012-07-311-40/+0
| | | | | | | | | | This was intended for translating filenames from filesystem charset to the terminal charset. Modern sane platforms use UTF-8 for everything, and on Windows we use unicode APIs, so this is not needed anymore. Remove filename_recode, all uses of it, options and configure checks related to terminal output charset, and code that tries to determine the same.
* input: stop trying to read terminal input on EOFUoti Urpala2012-04-061-1/+2
| | | | | | | | | | | | Stop trying to read terminal input if a read attempt returns EOF. The most important case where this matters is when someone runs the player with stdin redirected from /dev/null and without specifying --no-consolecontrols. This used to cause 100% CPU load while paused, as select() would continuously trigger on stdin (the need for --no-consolecontrols was not apparent to people with older mplayer versions, as input reading was less efficient and latencies like hardcoded sleeps kept CPU use well below 100%). Now this will only cause a "Dead key input" error message.
* windows: terminal: unicode, --msgcolor, size changeMartin Herkt2012-03-091-0/+6
| | | | | | | Make mp_msg() support unicode output, --msgcolor and variable screen sizes. Patch reintegrated by wm4.
* cleanup: Silence compilation warnings on MinGW-w64wm42012-03-011-2/+2
| | | | | | | | | | | | | | | | | | | Some of the code, especially the dshow and windows codec loader parts, are extremely hacky and likely full of bugs. The goal is merely getting rid of warnings that could obscure more important warnings and actual bugs, instead of fixing actual problems. This reduces the number of warnings from over 500 to almost the same as when compiling on Linux. Note that many problems stem from using the ancient wine-derived windows headers. There are some differences to the "proper" windows header. Changing the code to compile with the proper headers would be too much trouble, and it still has to work on Unix. Some of the changes might actually break compilation on legacy MinGW, but we don't support that anymore. Always use MinGW-w64, even when compiling to 32 bit. Fixes some warnings in the win32 loader code on Linux too.
* input: move all key code lists to input/keycodes.hUoti Urpala2011-05-021-1/+1
| | | | | | | | | | | | | Move the definitions of all special key codes (those not passed by ASCII value) to input/keycodes.h. Before they were spread between osdep/keycodes.h, input/joystick.h, input/mouse.h and input/ar.h, plus some special values in input.h. This was especially inconvenient as the codes had to be coordinated to not conflict between the files. The change requires a bit of ugliness as appleir.c includes <linux/input.h> which contains various conflicting KEY_* definitions. Work around this by adding a special preprocessor variable which can be used to avoid defining these in keycodes.h.
* Merge svn changes up to r30798Uoti Urpala2010-03-101-13/+24
|\
| * Add support for reading key events from MinGW xterm.reimar2010-02-281-1/+10
| | | | | | | | | | | | | | | | Unfortunately keys only arrive after enter was pressed and SetNamedPipeHandleState does not seem to help. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30784 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make -slave also work with the normal console on Windows.reimar2010-02-271-3/+8
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30780 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Do not misuse the stdin name.reimar2010-02-271-10/+8
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30777 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Include getch2.h to get rid of some warnings.reimar2010-02-271-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30776 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29412Uoti Urpala2009-07-071-3/+4
|\|
| * Use a malloced string for the get_term_charset return value.reimar2009-05-311-3/+4
| | | | | | | | | | | | | | | | This is necessary at least on POSIX systems since the buffer returned by nl_langinfo may change its contents with e.g. each setlocale call. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29332 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-17/+17
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-17/+17
| |
* | Merge svn changes up to r28862Uoti Urpala2009-03-071-1/+20
|\|
| * Add standard license headers to files.diego2009-03-011-1/+20
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28779 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28310Uoti Urpala2009-01-151-3/+5
|\| | | | | | | | | | | | | | | The libdvdread4 and libdvdnav directories, which are externals in the svn repository, are at least for now not included in any form. I added configure checks to automatically disable internal libdvdread and libdvdnav if the corresponding directories are not present; if they're added manually then things work the same as in svn.
| * Add missing 'void' keyword to parameterless function declarations.diego2009-01-051-3/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28267 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27441Uoti Urpala2008-08-081-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h command.c configure input/input.c libmpcodecs/dec_video.c libmpcodecs/vd.c libmpdemux/stheader.h libvo/sub.c libvo/video_out.c libvo/vo_xv.c libvo/vosub_vidix.c libvo/x11_common.c libvo/x11_common.h mp_core.h mplayer.c stream/stream.h
| * Rename font-related preprocessor directives.diego2008-08-071-1/+1
| | | | | | | | | | | | | | Switch them from a HAVE_ to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27425 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27399Uoti Urpala2008-08-021-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: libmpcodecs/vd.c libmpcodecs/ve_raw.c libvo/video_out.c libvo/x11_common.c mplayer.c
| * Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;diego2008-08-011-1/+1
| | | | | | | | | | | | | | CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27391 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27374Uoti Urpala2008-07-301-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h cfg-mplayer.h command.c configure libmpcodecs/dec_video.c libmpcodecs/vd.c libmpcodecs/vf_vo.c libmpdemux/demuxer.h libmpdemux/stheader.h mp_core.h mplayer.c stream/stream_radio.c
| * Start unifying names of internal preprocessor directives.diego2008-07-301-1/+1
| | | | | | | | | | | | | | | | Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r26979Uoti Urpala2008-06-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the conflicts are trivial. Conflicts: Makefile cfg-mplayer.h input/input.c libmenu/vf_menu.c libmpcodecs/dec_video.c libmpcodecs/vf_expand.c libmpcodecs/vf_vo.c libmpdemux/demux_mkv.c libmpdemux/demuxer.c libmpdemux/demuxer.h libvo/vo_directfb2.c libvo/vo_gl.c libvo/vo_winvidix.c libvo/vo_xv.c libvo/vo_xvidix.c libvo/vo_xvmc.c libvo/x11_common.c mplayer.c osdep/timer-linux.c stream/cache2.c
| * cosmetics: Remove useless parentheses from return statements.diego2008-05-161-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26791 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Add a context for mp_fifoUoti Urpala2008-04-291-2/+2
| | | | | | | | | | Store data in an allocated context and take it as an argument instead of using static variables.
* | mp_fifo.c, osdep/: Include corresponding .h in .c filesUoti Urpala2008-04-291-0/+2
|/
* Rename mp_input_win32_slave_cmd_func to mp_input_slave_cmd_func.diego2008-02-211-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26047 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make terminal input work more like VO key inputuau2007-08-251-2/+9
| | | | | | | | | | | | | | | | | The Unix version of getch2() could either return an internally buffered key or do a second-level select() in addition to the input.c one and then read more data. Change getch2() to always add all read keys with mplayer_put_key() (like video output window keyboard input does) and remove the internal select() from the Unix version. Make input.c call mplayer_get_key() directly. The primary motivation for this change is to make combining multiple event sources under one select() easier. Now getch2() only needs to be called when the corresponding fd is readable, and it will be possible to handle events from X-based VOs with the same code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24149 b3059339-0415-0410-9bf9-f77b7e298cf2
* "()" to "(void)" function param list fixesuau2007-04-011-1/+1
| | | | | | | patch from Stefan Huehner, stefan huehner org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22904 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add code to detect and convert to console codepage on Windows.reimar2007-03-041-0/+40
| | | | | | | Patch by Zuxy Meng [zuxy.meng at gmail com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22460 b3059339-0415-0410-9bf9-f77b7e298cf2
* Include stdio.h for printfreimar2007-03-041-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22459 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l, fix broken if (X >= Y >= Z) comparison, probably stopped F-keys from ↵reimar2006-04-151-1/+1
| | | | | | working git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18108 b3059339-0415-0410-9bf9-f77b7e298cf2
* getch2 should wait for input. Fixes 100% CPU usage during cache fill.reimar2006-04-101-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18071 b3059339-0415-0410-9bf9-f77b7e298cf2
* change erase to end of line, fall back to old behavior if no termcap foundods152005-12-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17259 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix erase to end of line with windows, windows terminal does not supportods152005-12-271-1/+1
| | | | | | | control codes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17252 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10000l to me, broke compilation on mingw, erase_to_end_of_line needs to beods152005-12-261-0/+1
| | | | | | | in both getch2 and getch2-win because only one of them is linked to. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17248 b3059339-0415-0410-9bf9-f77b7e298cf2
* Unify include paths, -I.. is in CFLAGS.diego2005-11-141-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16986 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix slave mode for mingw, patch by Anton Ragnarsson <anton.ragnarsson.1093 ↵faust32004-08-131-12/+6
| | | | | | at student.uu.se> some cleanup by be git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13016 b3059339-0415-0410-9bf9-f77b7e298cf2
* add a read function for slave mode on mingwfaust32003-09-221-0/+19
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10929 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix volume increasingfaust32003-06-011-1/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10231 b3059339-0415-0410-9bf9-f77b7e298cf2
* alternative timer and glob emulation code for mingw32 portfaust32003-04-251-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9984 b3059339-0415-0410-9bf9-f77b7e298cf2
* disable getch2 on windows when we can't read stdin (msys)faust32003-04-191-3/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9937 b3059339-0415-0410-9bf9-f77b7e298cf2
* windows getch2 for MINGW32 portfaust32003-03-301-0/+109
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9767 b3059339-0415-0410-9bf9-f77b7e298cf2