summaryrefslogtreecommitdiffstats
path: root/video/out/w32_common.h
Commit message (Collapse)AuthorAgeFilesLines
* w32_common, w32_keyboard: change license to LGPLwm42017-06-241-7/+7
| | | | All authors agreed.
* vo_direct3d: fix operationwm42015-10-311-1/+1
| | | | | | | | | Regression since commit 93db4233. I think the bit that was forgotten here was to remove the vo_w32_config() return value completely. The VO failed to init because that function always returned 0. This commit removes these bits and fixes the VO. Fixes #2434.
* win32: cleanup: remove some unneeded thingswm42015-10-021-1/+1
|
* Update license headersMarcin Kurczewski2015-04-131-5/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* win32: create OpenGL context on the GUI threadwm42014-08-051-0/+1
| | | | | | | | | | | | | | | | This fixes the fullscreen issues on Intel for me. I'm baffled by it and don't understand why this suddenly works. Intel drivers being shit? Windows being shit? HWND or HDC being only 97% thread-safe instead of 98%? Me missing something subtle that is not documented anywhere? Who knows. Now instead of creating the HDC and OpenGL context on the renderer thread, they're created on the GUI thread. The renderer thread will then only call wglMakeCurrent, SwapBuffers, and OpenGL standard functions. Probably fixes github issue #968.
* win32: make private struct private, refactorwm42014-07-261-41/+1
| | | | | | | | | | | | | | | | Preparation for moving win32 windowing to a separate thread. The codesize is reduced a bit, because some small functions are inlined, which reduces noise. The main change is that now most functions use the private struct directly, instead of accessing it indirectly through vo->w32. Accesses to vo are minimalized. The final goal is adding some sort of new windowing backend API. It would be cleaner to use that as context pointer for all functions (like struct vo was previously used), but since this is work in progress, we just go with this commit.
* win32: don't use VOCTRL_UPDATE_SCREENINFOwm42014-05-061-1/+6
| | | | Not very tested. At least it compiles.
* w32_common: use ToUnicode to translate key inputJames Ross-Gowan2014-04-171-0/+3
| | | | | | | | | | | | | | | | This replaces translate_key_input with a solution that gives mpv more control over how keyboard input is converted to unicode. As a result: - Key up/down events are generated the same way for all keys. - Dead keys generate their base character instead of being combined with the following character. - Many Ctrl and Ctrl+Alt key combinations that were previously broken are fixed, since it's possible to discover the base keys. - AltGr doesn't produce special characters when mp_input_use_alt_gr is false. This also fixes some logic to do with detecting AltGr and adds proper UTF-16 decoding.
* input: deal with spurious X11 LeaveNotify eventswm42013-09-011-0/+3
| | | | | | | | | | | | | | | | | | | | | If the mpv window is unfocus, clicking on the OSC should focus the window (done by the window manager) and allow interaction with the OSC. But somehow X sends a spurious LeaveNotify event, immediately followed by an EnterNotify event. This happens at least with IceWM. The result is that the OSC will disappear (due to receiving MOUSE_LEAVE). The OSC will stay invisible, because EnterNotify isn't handled, and there's nothing that could make the OSC appear again. Solve this by handling EnterNotify. We cause a redundant MOUSE_MOVE event to be sent, which triggers the code to make the OSC visible. We have to remove the code from input.c, which ignores redundant mouse move events. Since the code ignoring redundant mouse move events is still needed on Windows, move that code to w32_common.c. The need for this is documented in the code, also see commit 03fd2fe. (The original idea was to save some code by having this code in the core, but now it turns out that this didn't quite work out.)
* w32_common: Don't use globals for TRACKMOUSEEVENTDiogo Franco (Kovensky)2013-07-251-0/+3
| | | | It seems working on getch2 gave me some brain damage.
* w32_common: show the cursor in the window borderJames Ross-Gowan2013-07-211-0/+1
| | | | | | | | | | | | | | | | | | When the cursor was in the window border, it could be hidden but it wouldn't appear again, since mpv doesn't process mouse input there. The code used ShowCursor, which is a horrid stateful API designed for mouseless Win16 systems that incremented or decremented a global counter to keep track of how many applications needed to display a special cursor (like a busy cursor.) Replace that with a simple flag, handle WM_SETCURSOR and use SetCursor(NULL) to hide the mouse cursor, but only when the mouse is in the client area. DefWindowProc will set the correct cursor on the border as long as it isn't hidden with ShowCursor. PowerPoint also uses SetCursor(NULL) to hide the cursor when showing a presentation, so it's probably safe. See http://blogs.msdn.com/b/oldnewthing/archive/2009/12/17/9937972.aspx
* w32: enable screensaver when pausedwm42013-06-141-0/+1
| | | | | | | This is quite similar to the previous commit. Untested. I'm not sure if this is how it's supposed to work. At least --no-stop-screensaver should work in any case.
* w32: use vo_w32_control() for all VOswm42013-05-261-4/+0
|
* video/out: introduce vo_control for gl_common based VOswm42013-05-261-0/+1
| | | | | | | | | | | | | | | | Instead of having separate callbacks for each backend-handled feature (like MPGLContext.fullscreen, MPGLContext.border, etc.), pass the VOCTRL responsible for this directly to the backend. This allows removing a bunch of callbacks, that currently must be set even for optional/lesser features (like VOCTRL_BORDER). This requires changes to all VOs using gl_common, as well as all backends that support gl_common. Also introduce VOCTRL_CHECK_EVENTS. vo.check_events is now optional. VO backends can use VOCTRL_CHECK_EVENTS instead to implementing check_events. This has the advantage that the event handling code in VOs doesn't have to be duplicated if vo_control() is used.
* gl_common: split into platform specific fileswm42013-03-281-0/+2
| | | | | | | | | | | Do this instead of stuffing all x11/cocoa/win32/wayland specific code into gl_common.c. The cocoa specific parts could probably go directly into cocoa_common.m, possibly same with wayland. Also redo how the list of backends is managed. Get rid of the GLTYPE_ constants. Instead of having a big switch() on GLTYPE_, each backend entry has a function pointer to setup the MPGLContext callback (e.g. mpgl_set_backend_x11()).
* w32_common: remove unused variablewm42013-03-031-2/+0
| | | | The depth was printed in verbose mode. Completely useless.
* video/out: remove video mode switching (--vm)wm42013-02-261-2/+0
| | | | | | | | | | | | | | | | | | | | This allowed making the player switch the monitor video mode when creating the video window. This was a questionable feature, and with today's LCD screens certainly not useful anymore. Switching to a random video mode (going by video width/height) doesn't sound too useful either. I'm not sure about the win32 implementation, but the X part had several bugs. Even in mplayer-svn (where x11_common.c hasn't been receiving any larger changes for a long time), this code is buggy and doesn't do the right thing anyway. (And what the hell _did_ it do when using multiple physical monitors?) If you really want this, write a shell script that calls xrandr before and after calling mpv. vo_sdl still can do mode switching, because SDL has native support for it, and using it is trivial. Add a new sub-option for this.
* core: add fs-screen option for fullscreen display selectionStefano Pigozzi2013-02-211-0/+1
| | | | | | | | | | | | `--fs-screen` allows to decide what display to go fullscreen into. The semantics of `--screen` changed and now it is only used to select the windowed display when starting the application. This is useful for people using mpv with an external TV. They will start windowed on their laptop's screen and switch to fullscreen on the TV. @wm4 worked on the x11 and w32 parts of the code. All is squashed in one commit for history clarity.
* win32: remove pointless get/release DC wrapperswm42012-11-121-2/+0
|
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-0/+66
Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.