diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/dxva2.c | 4 | ||||
-rw-r--r-- | video/out/gl_w32.c | 4 | ||||
-rw-r--r-- | video/out/w32_common.c | 18 |
3 files changed, 13 insertions, 13 deletions
diff --git a/video/decode/dxva2.c b/video/decode/dxva2.c index d207aa504b..c87093812c 100644 --- a/video/decode/dxva2.c +++ b/video/decode/dxva2.c @@ -355,7 +355,7 @@ static int create_device(struct lavc_ctx *s) } } - ctx->d3dlib = LoadLibraryW(u"d3d9.dll"); + ctx->d3dlib = LoadLibrary(L"d3d9.dll"); if (!ctx->d3dlib) { MP_ERR(ctx, "Failed to load D3D9 library\n"); goto fail; @@ -423,7 +423,7 @@ static int dxva2_init(struct lavc_ctx *s) ctx->deviceHandle = INVALID_HANDLE_VALUE; - ctx->dxva2lib = LoadLibraryW(u"dxva2.dll"); + ctx->dxva2lib = LoadLibrary(L"dxva2.dll"); if (!ctx->dxva2lib) { MP_ERR(ctx, "Failed to load DXVA2 library\n"); goto fail; diff --git a/video/out/gl_w32.c b/video/out/gl_w32.c index 68df3397c1..87f98f117e 100644 --- a/video/out/gl_w32.c +++ b/video/out/gl_w32.c @@ -84,7 +84,7 @@ static void *w32gpa(const GLubyte *procName) void *res = wglGetProcAddress(procName); if (res) return res; - oglmod = GetModuleHandleW(u"opengl32.dll"); + oglmod = GetModuleHandle(L"opengl32.dll"); return GetProcAddress(oglmod, procName); } @@ -208,7 +208,7 @@ static void create_ctx(void *ptr) if (!w32_ctx->context) create_context_w32_old(ctx); - w32_ctx->dwmapi_dll = LoadLibraryW(u"Dwmapi.dll"); + w32_ctx->dwmapi_dll = LoadLibrary(L"Dwmapi.dll"); if (w32_ctx->dwmapi_dll) w32_ctx->dwmflush = (DwmFlush_t)GetProcAddress(w32_ctx->dwmapi_dll, "DwmFlush"); diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 02e7064b59..5197ad054c 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -42,7 +42,7 @@ #include "misc/rendezvous.h" #include "talloc.h" -static const WCHAR classname[] = u"mpv"; +static const wchar_t classname[] = L"mpv"; static __thread struct vo_w32_state *w32_thread_context; @@ -237,7 +237,7 @@ static HRESULT STDMETHODCALLTYPE DropTarget_Drop(IDropTarget* This, UINT nrecvd_files = 0; for (UINT i = 0; i < numFiles; i++) { UINT len = DragQueryFileW(hDrop, i, NULL, 0); - WCHAR* buf = talloc_array(NULL, WCHAR, len + 1); + wchar_t* buf = talloc_array(NULL, wchar_t, len + 1); if (DragQueryFileW(hDrop, i, buf, len + 1) == len) { char* fname = mp_to_utf8(files, buf); @@ -400,12 +400,12 @@ static int mod_state(struct vo_w32_state *w32) return res; } -static int decode_surrogate_pair(WCHAR lead, WCHAR trail) +static int decode_surrogate_pair(wchar_t lead, wchar_t trail) { return 0x10000 + (((lead & 0x3ff) << 10) | (trail & 0x3ff)); } -static int decode_utf16(struct vo_w32_state *w32, WCHAR c) +static int decode_utf16(struct vo_w32_state *w32, wchar_t c) { // Decode UTF-16, keeping state in w32->high_surrogate if (IS_HIGH_SURROGATE(c)) { @@ -435,7 +435,7 @@ static void clear_keyboard_buffer(void) static const UINT vkey = VK_DECIMAL; static const BYTE keys[256] = { 0 }; UINT scancode = MapVirtualKey(vkey, MAPVK_VK_TO_VSC); - WCHAR buf[10]; + wchar_t buf[10]; int ret = 0; // Use the method suggested by Michael Kaplan to clear any pending dead @@ -453,7 +453,7 @@ static int to_unicode(UINT vkey, UINT scancode, const BYTE keys[256]) // Make the buffer 10 code units long to be safe, same as here: // https://web.archive.org/web/20101013215215/http://blogs.msdn.com/b/michkap/archive/2006/03/24/559169.aspx - WCHAR buf[10] = { 0 }; + wchar_t buf[10] = { 0 }; // Dead keys aren't useful for key shortcuts, so clear the keyboard state clear_keyboard_buffer(); @@ -541,7 +541,7 @@ static void handle_key_up(struct vo_w32_state *w32, UINT vkey, UINT scancode) } } -static bool handle_char(struct vo_w32_state *w32, WCHAR wc) +static bool handle_char(struct vo_w32_state *w32, wchar_t wc) { int c = decode_utf16(w32, wc); @@ -1129,7 +1129,7 @@ static void *gui_thread(void *ptr) .style = CS_HREDRAW | CS_VREDRAW, .lpfnWndProc = WndProc, .hInstance = hInstance, - .hIcon = LoadIconW(hInstance, u"IDI_ICON1"), + .hIcon = LoadIconW(hInstance, L"IDI_ICON1"), .hCursor = LoadCursor(NULL, IDC_ARROW), .lpszClassName = classname, }; @@ -1325,7 +1325,7 @@ static int gui_thread_control(struct vo_w32_state *w32, int request, void *arg) SetThreadExecutionState(ES_CONTINUOUS); return VO_TRUE; case VOCTRL_UPDATE_WINDOW_TITLE: { - WCHAR *title = mp_from_utf8(NULL, (char *)arg); + wchar_t *title = mp_from_utf8(NULL, (char *)arg); SetWindowTextW(w32->window, title); talloc_free(title); return VO_TRUE; |