summaryrefslogtreecommitdiffstats
path: root/libvo/w32_common.c
Commit message (Collapse)AuthorAgeFilesLines
* options: remove --adapterwm42012-10-301-23/+0
| | | | | This probably didn't do anything. Maybe OpenGL VOs on win32 actually could make use of it, but even then it probably didn't work.
* Rename to "mpv"wm42012-10-121-1/+1
| | | | | | | | | | | | | | | | | | This changes the name of this project to mpv. Most user-visible mentions of "MPlayer" and "mplayer" are changed to "mpv". The binary name and the default config file location are changed as well. The new default config file location is: ~/.mpv/ Remove etc/mplayer.desktop. Apparently this was for the MPlayer GUI, which has been removed from mplayer2 ages ago. We don't have a logo, and the MS Windows resource files sort-of require one, so leave etc/mplayer.ico/.xpm as-is. Remove the debian and rpm packaging scripts. These contained outdated dependencies and likely were more harmful than useful. (Patches which add working and well-tested packaging are welcome.)
* win32: don't crash if vo_w32_uninit() is called without vo_w32_init()wm42012-04-241-0/+2
| | | | | This is a recent regression. At least vo_direct3d uses vo_w32_uninit() in this way, and crashed if initialization failed at an early point.
* win32: fix handling of AltGrwm42012-04-141-0/+5
| | | | | | | Windows implicitly enables Ctrl+Alt on AltGr. These modifiers are unwanted for keys that have special mappings on AltGr. Add warning about different behavior on wine.
* win32: simplify icon loadingwm42012-04-141-6/+1
| | | | | I have no idea why the code used this roundabout method. Also detab mplayer.rc.
* win32: move global variables into a struct & some refactoringwm42012-04-141-249/+260
| | | | | | | | | | This reflects the changes done to x11_common in mplayer2 some years ago. It makes it possible to open multiple VOs at once. The removed defines are probably for ancient versions of MinGW with incomplete headers. Remove some minor code duplication.
* win32: use GetKeyState() instead of maintaining the state manuallywm42012-04-141-16/+9
|
* win32: prevent modifier keys from getting stuckwm42012-04-131-0/+5
| | | | | | Especially Alt would get stuck when using Alt+Tab to change focus. Apparently Windows doesn't send an appropriate key up message. Solve this by resetting the modifier state on focus change.
* win32: make F10 key not enter the window menuwm42012-04-071-0/+2
| | | | | | | | | | Normally, F10 enters the window menu (it's invisible at first, and the blocking/recursive message handling by Windows makes it look like mplayer was paused, without much visual indication). Stop this almost completely useless behavior by signalling Windows that the F10 key was handled. This makes the F10 key usable as normal mplayer shortcut. This is probably still somewhat questionable.
* win32: fix behavior of enter keywm42012-04-071-5/+11
| | | | | | | | | | | Windows sends the same character code on CTRL+Enter and CTRL+J. I'm not sure what's the proper way to deal with this, but the hack added with this commit seems to work fine. Just to be sure, don't forward the modified wParam to DefWindowProc. Add the missing "break;" in the switch statement, which sometimes produced bogus mouse button events. Fix the F12 key, which wasn't mapped correctly due to a typo.
* win32: use more unicode functionswm42012-04-061-38/+24
| | | | | | | | Use the *W variants instead of the implicit *A functions. (One could define the UNICODE macro to switch the functions without suffix from A to W, but I'm too lazy to figure out how portable that is, etc.) Also make sure io.h defines a unicode aware printf().
* win32: support key modifiers (shift, ctrl, alt)wm42012-04-061-13/+45
| | | | | | | | | | Support for this is rather simple, and some combinations of modifiers and keys don't work. For example, Ctrl+Alt+character is not supported, because Windows doesn't emit a WM_CHAR in this case. Also add support for the pause and print screen keys. Remove the pointless KEY_CTRL translation. Remove KEY_CTRL altogether, because it was not clear what it was actually supposed to mean.
* win32: properly set window titlewm42012-03-171-2/+8
| | | | | | | | | | | | Set the window title on win32 based VOs using the same logic as on X11 and Cocoa. Until now, the window title when using vo_direct3d and vo_gl was hardcoded to "MPlayer - The Movie Player", and vo_directx showed "MPlayer". Now it will show "mplayer2", unless the --title or --use-filename-title options are used. Change the internal window class name to the string "mplayer2" too.
* win32: fix fullscreen not working on Windows 7wm42012-03-171-2/+2
| | | | | | | | | Switching to fullscreen mode on Windows 7 didn't work: the window position and size weren't set to fullscreen. It turns out that merely calling SetWindowLong caused windows to send move/resize messages, which changed the global variables that were supposed to contain the new window size. Move the SetWindowLong call out of the way to guarantee that always the correct values are used.
* win32: different method to force window aspect ratiowm42012-03-171-15/+53
| | | | | | | | | | | | | The code used WM_WINDOWPOSCHANGING to force an spect ratio. This didn't behave well if the left/top window borders were used for resizing. Resizing with these borders changed the screen position of the right/bottom as well, which is unintuitive and annoying. Use WM_SIZING instead. Unlike WM_WINDOWPOSCHANGING, WM_SIZING knows about which border is being used for resizing and can act accordingly. Note that the calculated window size doesn't necessarily match with the size mplayer calculates, but this problem exists on x11 as well.
* win32, vo_directx: don't use vo_dx/dy, directly query window positionwm42012-03-171-7/+4
| | | | | This should be a bit robuster than trying to maintain vo_dx/dy. vo_dy/dy are now completely unused on win32, except for initialization.
* win32: fix window creation and size handlingwm42012-03-171-48/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes various issues with the way the window position and size is setup. Most importantly, it fixes some bugs with restoring from fullscreen state. Rename create_rendering_context() to reinit_window_state(). This function doesn't create anything, it just sets the window bounds and styles. Do not use vo_dx/dy for the window position, as video_out.c overwrites it with each vo_config() call. Use private variables window_x/y instead. A big cause for issues was that reinit_window_state() accidentally cleared the WS_VISIBLE style. I suspect that the API call to temporarily hide the window was a hack to deal with this. Another bug was that the window style was changed without calling SetWindowPos with SWP_FRAMECHANGED (as the MSDN documentation says). Properly initialize window position and size on vo_config following the same rules as the x11 backend: - Never change the window position. The window position should be kept, as the user might move the window, and resetting the window position e.g. during ordered chapter playback is not desired. - Never change the window size, unless the size of the video changes. These rules don't apply to fullscreen. When switching from fullscreen to windowed mode, the backend should restore the previous windowed size and position. When the VO was reconfigured during playback (vo_config() etc.), the saved window position and size should be changed according to the rules above, even if the window was in fullscreen mode during reconfiguring. Note that these rules might be perceived as awkward by some users: if you play multiple files with different resolutions, the window won't be centered when playing the files after the first. This is not a bug.
* cleanup: Silence compilation warnings on MinGW-w64wm42012-03-011-6/+8
| | | | | | | | | | | | | | | | | | | 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.
* VO: w32_common: also generate VO_EVENT_MOVEreimar2011-07-061-0/+8
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33650 b3059339-0415-0410-9bf9-f77b7e298cf2 Generate VO_EVENT_MOVE also with -wid. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33656 b3059339-0415-0410-9bf9-f77b7e298cf2
* Windows: vo/input: handle WM_XBUTTONDOWN messageRudolf Polzer2011-06-191-1/+16
| | | | | | | WM_XBUTTONDOWN is used for extra mouse buttons (mapped to button 5 and button 6 in mplayer2). Previously only vo_directx handled this message. Add support to w32_common.c event handling too (used by vo_direct3d and vo_gl/vo_gl2 on Windows).
* input: move all key code lists to input/keycodes.hUoti Urpala2011-05-021-2/+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.
* vo_gl: create stereo-capable window when using Quadbuffer 3Dreimar2010-11-141-0/+2
| | | | | | | Select a stereo pixel format for window when Quadbuffer OpenGL was selected as 3D mode. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32620 b3059339-0415-0410-9bf9-f77b7e298cf2
* libvo/w32_common.c: Move setting of pixel format from init to configreimar2010-11-141-21/+21
| | | | | | This allows it to depend on flags etc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32619 b3059339-0415-0410-9bf9-f77b7e298cf2
* libvo/w32_common.c: minor cleanupreimar2010-11-141-18/+19
| | | | | | | | | | Some indentation fixes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32611 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify: Use early return instead of large if block. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32612 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes up to r31189Uoti Urpala2010-05-301-6/+12
|\
| * Do not return pointer to on-stack memory.reimar2010-05-191-1/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31184 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix return value (it was missing completely).reimar2010-05-191-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31183 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Handle -wid Window being closed for direct3d and gl vos on Windows.reimar2010-05-191-4/+8
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31182 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31097Uoti Urpala2010-04-261-9/+2
|\|
| * Avoid duplicating mouse-movement command-generation code.reimar2010-04-251-6/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31091 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Deduplicate enable_mouse_movements declaration.reimar2010-04-251-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31089 b3059339-0415-0410-9bf9-f77b7e298cf2
| * rename 'struct keymap' -> 'struct mp_keymap'siretart2010-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This avoids the compilation failure on kFreeBSD (at least amd64): In file included from libvo/vo_directfb2.c:44: libvo/video_out.h:267: error: redefinition of 'struct keymap' This is because libvo/vo_directfb2.c #includes sys/kd.h, which in turn includes sys/kbio.h, which defines another 'struct keymap'. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31059 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30514Uoti Urpala2010-03-091-24/+26
|\|
| * Add support for VOFLAG_HIDDEN to the w32 backend.reimar2010-02-041-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30509 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Set the PixelFormat right after creating the window and set it only once.reimar2010-02-041-23/+23
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30508 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29962Uoti Urpala2009-11-231-2/+42
|\|
| * Add support for Windows OpenGL rendering onto a device instead of into a window.reimar2009-11-211-2/+42
| | | | | | | | | | | | | | | | | | Has little use except for experimenting - on Windows 9x it could be used to render on monitors that were not managed by Windows, but that feature was removed in newer Windows versions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29946 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29644Uoti Urpala2009-09-041-1/+1
|\|
| * Disable -keepaspect with -wid in w32_common code.reimar2009-08-271-1/+1
| | | | | | | | | | | | | | This does not work in a useful way and was unintentionally "enabled" when -wid was made to use a separate window. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29559 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-4/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-4/+4
| |
* | Merge svn changes up to r29117Uoti Urpala2009-04-011-1/+1
|\|
| * "MPlayer - The Movie Player" should be used as the player name.diego2009-03-151-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28955 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28728Uoti Urpala2009-02-251-5/+6
|\|
| * Calculate border size in aspect keeping code by using AdjustWindowRectreimar2009-02-231-5/+6
| | | | | | | | | | | | | | | | instead of GetClientRect and GetWindowRect since GetClientRect returns nonsensical values if Window is still minimized. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28713 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28537Uoti Urpala2009-02-121-0/+18
|\|
| * Add standard license headers, unify header formatting.diego2009-02-081-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28481 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28310Uoti Urpala2009-01-151-0/+10
|\| | | | | | | | | | | | | | | 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.
| * Support F- and numpad keys for w32_common based vos.reimar2008-12-301-0/+10
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28214 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28176Uoti Urpala2008-12-221-16/+18
|\| | | | | | | | | | | Conflicts: libvo/video_out.c libvo/x11_common.c
| * Add and use a special lookup function to do table-based translation to ↵reimar2008-12-201-16/+18
| | | | | | | | | | | | MPlayer keycodes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28172 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28087Uoti Urpala2008-12-041-4/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: command.c libao2/ao_ivtv.c libao2/ao_v4l2.c libmpcodecs/dec_video.h libvo/aspect.h libvo/sub.c libvo/sub.h libvo/vo_directx.c libvo/vo_macosx.m libvo/vo_quartz.c mp_core.h mplayer.c mplayer.h osdep/getch2.h osdep/timer.h
| * More robust w32 -wid size handlingreimar2008-12-031-0/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28074 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Reindent after previous commitreimar2008-12-031-5/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28073 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Do not override the vo_dwidth/vo_dheight values in vo_w32_configreimar2008-12-031-0/+3
| | | | | | | | | | | | | | in -wid mode because we ignore the requested size in that case. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28072 b3059339-0415-0410-9bf9-f77b7e298cf2
* | w32_common.c, vo_direct3d.c: Fix Windows compilation issuesUoti Urpala2008-12-021-2/+2
| | | | | | | | | | | | In w32_common.c the special "old_vo_defines.h" header was included too late. vo_direct3d.c was copied from svn without fixing the type of the control() function.
* | Merge svn changes up to r27979Uoti Urpala2008-11-221-0/+98
|\|
| * cosmetics: typo fixesdiego2008-11-211-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27975 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Doxygen documentation for w32_common.creimar2008-11-181-0/+98
| | | | | | | <