[vlc-commits] windows modules: use a consistent format to log HRESULT

Steve Lhomme git at videolan.org
Wed Jun 12 12:40:25 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jun 12 10:02:44 2019 +0200| [67ea55b05adfaef31a311f36c3c889fc7f220090] | committer: Steve Lhomme

windows modules: use a consistent format to log HRESULT

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=67ea55b05adfaef31a311f36c3c889fc7f220090
---

 modules/access/dshow/dshow.cpp         |  6 ++--
 modules/access/dtv/bdagraph.cpp        |  4 +--
 modules/access/wasapi.c                | 18 ++++++------
 modules/audio_output/directsound.c     |  2 +-
 modules/audio_output/mmdevice.c        | 30 ++++++++++----------
 modules/audio_output/wasapi.c          | 26 +++++++++---------
 modules/audio_output/winstore.c        |  8 +++---
 modules/codec/avcodec/d3d11va.c        |  6 ++--
 modules/codec/avcodec/dxva2.c          |  6 ++--
 modules/hw/d3d11/d3d11_deinterlace.c   |  2 +-
 modules/hw/d3d11/d3d11_filters.c       |  4 +--
 modules/hw/d3d11/d3d11_surface.c       | 16 +++++------
 modules/hw/d3d9/dxa9.c                 |  2 +-
 modules/text_renderer/sapi.cpp         |  2 +-
 modules/video_chroma/d3d11_fmt.c       |  4 +--
 modules/video_chroma/d3d9_fmt.c        |  4 +--
 modules/video_output/win32/common.c    |  2 +-
 modules/video_output/win32/direct3d9.c | 50 +++++++++++++++++-----------------
 18 files changed, 96 insertions(+), 96 deletions(-)

diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index 1e65eb36e4..1076e64085 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -1228,7 +1228,7 @@ FindCaptureDevice( vlc_object_t *p_this, std::string *p_devicename,
                            IID_ICreateDevEnum, (void**)p_dev_enum.GetAddressOf() );
     if( FAILED(hr) )
     {
-        msg_Err( p_this, "failed to create the device enumerator (0x%lx)", hr);
+        msg_Err( p_this, "failed to create the device enumerator (0x%lX)", hr);
         return p_base_filter;
     }
 
@@ -1242,7 +1242,7 @@ FindCaptureDevice( vlc_object_t *p_this, std::string *p_devicename,
                                                 p_class_enum.GetAddressOf(), 0 );
     if( FAILED(hr) )
     {
-        msg_Err( p_this, "failed to create the class enumerator (0x%lx)", hr );
+        msg_Err( p_this, "failed to create the class enumerator (0x%lX)", hr );
         return p_base_filter;
     }
 
@@ -1306,7 +1306,7 @@ FindCaptureDevice( vlc_object_t *p_this, std::string *p_devicename,
                     if( FAILED(hr) )
                     {
                         msg_Err( p_this, "couldn't bind moniker to filter "
-                                 "object (0x%lx)", hr );
+                                 "object (0x%lX)", hr );
                         return NULL;
                     }
                     return p_base_filter;
diff --git a/modules/access/dtv/bdagraph.cpp b/modules/access/dtv/bdagraph.cpp
index 907e050294..bd548ad1fc 100644
--- a/modules/access/dtv/bdagraph.cpp
+++ b/modules/access/dtv/bdagraph.cpp
@@ -3000,7 +3000,7 @@ HRESULT BDAGraph::Start()
     hr = p_media_control->Run();
     if( SUCCEEDED( hr ) )
     {
-        msg_Dbg( p_access, "Start: Graph started, hr=0x%lx", hr );
+        msg_Dbg( p_access, "Start: Graph started, hr=0x%lX", hr );
         return S_OK;
     }
 
@@ -3019,7 +3019,7 @@ HRESULT BDAGraph::Start()
     msg_Dbg( p_access, "Start: got state" );
     if( i_state == State_Running )
     {
-        msg_Dbg( p_access, "Graph started after a delay, hr=0x%lx", hr );
+        msg_Dbg( p_access, "Graph started after a delay, hr=0x%lX", hr );
         return S_OK;
     }
 
diff --git a/modules/access/wasapi.c b/modules/access/wasapi.c
index 9f06c792c2..6377a3c7ff 100644
--- a/modules/access/wasapi.c
+++ b/modules/access/wasapi.c
@@ -97,7 +97,7 @@ static IAudioClient *GetClient(demux_t *demux, bool *restrict loopbackp)
                           &IID_IMMDeviceEnumerator, &pv);
     if (FAILED(hr))
     {
-        msg_Err(demux, "cannot create device enumerator (error 0x%lx)", hr);
+        msg_Err(demux, "cannot create device enumerator (error 0x%lX)", hr);
         return NULL;
     }
     e = pv;
@@ -110,7 +110,7 @@ static IAudioClient *GetClient(demux_t *demux, bool *restrict loopbackp)
     IMMDeviceEnumerator_Release(e);
     if (FAILED(hr))
     {
-        msg_Err(demux, "cannot get default device (error 0x%lx)", hr);
+        msg_Err(demux, "cannot get default device (error 0x%lX)", hr);
         return NULL;
     }
 
@@ -118,7 +118,7 @@ static IAudioClient *GetClient(demux_t *demux, bool *restrict loopbackp)
     *loopbackp = GetDeviceFlow(dev) == eRender;
     IMMDevice_Release(dev);
     if (FAILED(hr))
-        msg_Err(demux, "cannot activate device (error 0x%lx)", hr);
+        msg_Err(demux, "cannot activate device (error 0x%lX)", hr);
     return pv;
 }
 
@@ -231,7 +231,7 @@ static es_out_id_t *CreateES(demux_t *demux, IAudioClient *client, bool loop,
     hr = IAudioClient_GetMixFormat(client, &pwf);
     if (FAILED(hr))
     {
-        msg_Err(demux, "cannot get mix format (error 0x%lx)", hr);
+        msg_Err(demux, "cannot get mix format (error 0x%lX)", hr);
         return NULL;
     }
 
@@ -260,7 +260,7 @@ static es_out_id_t *CreateES(demux_t *demux, IAudioClient *client, bool loop,
     CoTaskMemFree(pwf);
     if (FAILED(hr))
     {
-        msg_Err(demux, "cannot initialize audio client (error 0x%lx)", hr);
+        msg_Err(demux, "cannot initialize audio client (error 0x%lX)", hr);
         return NULL;
     }
     return es_out_Add(demux->out, &fmt);
@@ -297,7 +297,7 @@ static unsigned __stdcall Thread(void *data)
     hr = IAudioClient_GetService(sys->client, &IID_IAudioCaptureClient, &pv);
     if (FAILED(hr))
     {
-        msg_Err(demux, "cannot get capture client (error 0x%lx)", hr);
+        msg_Err(demux, "cannot get capture client (error 0x%lX)", hr);
         goto out;
     }
     capture = pv;
@@ -305,7 +305,7 @@ static unsigned __stdcall Thread(void *data)
     hr = IAudioClient_Start(sys->client);
     if (FAILED(hr))
     {
-        msg_Err(demux, "cannot start client (error 0x%lx)", hr);
+        msg_Err(demux, "cannot start client (error 0x%lX)", hr);
         IAudioCaptureClient_Release(capture);
         goto out;
     }
@@ -408,7 +408,7 @@ static int Open(vlc_object_t *obj)
 
     hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
     if (unlikely(FAILED(hr))) {
-        msg_Err(demux, "cannot initialize COM (error 0x%lx)", hr);
+        msg_Err(demux, "cannot initialize COM (error 0x%lX)", hr);
         goto error;
     }
 
@@ -426,7 +426,7 @@ static int Open(vlc_object_t *obj)
 
     hr = IAudioClient_SetEventHandle(sys->client, sys->events[1]);
     if (FAILED(hr)) {
-        msg_Err(demux, "cannot set event handle (error 0x%lx)", hr);
+        msg_Err(demux, "cannot set event handle (error 0x%lX)", hr);
         goto error;
     }
 
diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c
index f93237a93a..9d06bd29df 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -285,7 +285,7 @@ static HRESULT Play( vlc_object_t *obj, aout_stream_sys_t *sys,
                                             0, 0, DSBPLAY_LOOPING );
     }
     if( dsresult != DS_OK )
-        msg_Err( obj, "cannot start playing buffer: (hr=0x%0lx)", dsresult );
+        msg_Err( obj, "cannot start playing buffer: (hr=0x%lX)", dsresult );
     else
     {
         vlc_mutex_lock( &sys->lock );
diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index 3d9f7a718c..c9f0d5016c 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -52,7 +52,7 @@ static int TryEnterMTA(vlc_object_t *obj)
     HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
     if (unlikely(FAILED(hr)))
     {
-        msg_Err (obj, "cannot initialize COM (error 0x%lx)", hr);
+        msg_Err (obj, "cannot initialize COM (error 0x%lX)", hr);
         return -1;
     }
     return 0;
@@ -819,7 +819,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
         msg_Dbg(aout, "using selected device %ls", sys->requested_device);
         hr = IMMDeviceEnumerator_GetDevice(it, sys->requested_device, &sys->dev);
         if (FAILED(hr))
-            msg_Err(aout, "cannot get selected device %ls (error 0x%lx)",
+            msg_Err(aout, "cannot get selected device %ls (error 0x%lX)",
                     sys->requested_device, hr);
         sys->acquired_device = sys->requested_device;
     }
@@ -834,7 +834,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
                                                          eConsole, &sys->dev);
         if (FAILED(hr))
         {
-            msg_Err(aout, "cannot get default device (error 0x%lx)", hr);
+            msg_Err(aout, "cannot get default device (error 0x%lX)", hr);
             sys->acquired_device = NULL;
         }
         else
@@ -867,7 +867,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
     }
     else
     {
-        msg_Err(aout, "cannot get device identifier (error 0x%lx)", hr);
+        msg_Err(aout, "cannot get device identifier (error 0x%lX)", hr);
         return hr;
     }
 
@@ -900,12 +900,12 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
                                                          &sys->session_events);
         }
         else
-            msg_Err(aout, "cannot get session control (error 0x%lx)", hr);
+            msg_Err(aout, "cannot get session control (error 0x%lX)", hr);
 
         hr = IAudioSessionManager_GetSimpleAudioVolume(manager, guid, FALSE,
                                                        &volume);
         if (FAILED(hr))
-            msg_Err(aout, "cannot get simple volume (error 0x%lx)", hr);
+            msg_Err(aout, "cannot get simple volume (error 0x%lX)", hr);
 
         /* Try to get version 2 (Windows 7) of the manager & control */
         wchar_t *siid = NULL;
@@ -942,7 +942,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
     }
     else
     {
-        msg_Err(aout, "cannot activate session manager (error 0x%lx)", hr);
+        msg_Err(aout, "cannot activate session manager (error 0x%lX)", hr);
         control = NULL;
         volume = NULL;
     }
@@ -959,10 +959,10 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
             msg_Dbg(aout, "volume from %+f dB to %+f dB with %f dB increments",
                     min, max, inc);
         else
-            msg_Err(aout, "cannot get volume range (error 0x%lx)", hr);
+            msg_Err(aout, "cannot get volume range (error 0x%lX)", hr);
     }
     else
-        msg_Err(aout, "cannot activate endpoint volume (error %lx)", hr);
+        msg_Err(aout, "cannot activate endpoint volume (error 0x%lX)", hr);
 
     /* Main loop (adjust volume as long as device is unchanged) */
     while (sys->requested_device == NULL)
@@ -976,7 +976,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
             {
                 hr = ISimpleAudioVolume_SetMasterVolume(volume, level, NULL);
                 if (FAILED(hr))
-                    msg_Err(aout, "cannot set master volume (error 0x%lx)",
+                    msg_Err(aout, "cannot set master volume (error 0x%lX)",
                             hr);
             }
             sys->requested_volume = -1.f;
@@ -985,7 +985,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
             if (SUCCEEDED(hr))
                 aout_VolumeReport(aout, cbrtf(level * sys->gain));
             else
-                msg_Err(aout, "cannot get master volume (error 0x%lx)", hr);
+                msg_Err(aout, "cannot get master volume (error 0x%lX)", hr);
 
             BOOL mute;
 
@@ -993,7 +993,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
             if (SUCCEEDED(hr))
                 aout_MuteReport(aout, mute != FALSE);
             else
-                msg_Err(aout, "cannot get mute (error 0x%lx)", hr);
+                msg_Err(aout, "cannot get mute (error 0x%lX)", hr);
 
             if (sys->requested_mute >= 0)
             {
@@ -1001,7 +1001,7 @@ static HRESULT MMSession(audio_output_t *aout, IMMDeviceEnumerator *it)
 
                 hr = ISimpleAudioVolume_SetMute(volume, mute, NULL);
                 if (FAILED(hr))
-                    msg_Err(aout, "cannot set mute (error 0x%lx)", hr);
+                    msg_Err(aout, "cannot set mute (error 0x%lX)", hr);
             }
             sys->requested_mute = -1;
         }
@@ -1062,7 +1062,7 @@ static void *MMThread(void *data)
                                                           &sys->device_events);
     HRESULT hr = DevicesEnum(it, MMThread_DevicesEnum_Added, aout);
     if (FAILED(hr))
-        msg_Warn(aout, "cannot enumerate audio endpoints (error 0x%lx)", hr);
+        msg_Warn(aout, "cannot enumerate audio endpoints (error 0x%lX)", hr);
 
     EnterCriticalSection(&sys->lock);
 
@@ -1304,7 +1304,7 @@ static int Open(vlc_object_t *obj)
     if (FAILED(hr))
     {
         LeaveMTA();
-        msg_Dbg(aout, "cannot create device enumerator (error 0x%lx)", hr);
+        msg_Dbg(aout, "cannot create device enumerator (error 0x%lX)", hr);
         goto error;
     }
     sys->it = pv;
diff --git a/modules/audio_output/wasapi.c b/modules/audio_output/wasapi.c
index 03ba2a46ea..9225c987a1 100644
--- a/modules/audio_output/wasapi.c
+++ b/modules/audio_output/wasapi.c
@@ -113,7 +113,7 @@ static HRESULT TimeGet(aout_stream_t *s, vlc_tick_t *restrict delay)
     hr = IAudioClient_GetService(sys->client, &IID_IAudioClock, &pv);
     if (FAILED(hr))
     {
-        msg_Err(s, "cannot get clock (error 0x%lx)", hr);
+        msg_Err(s, "cannot get clock (error 0x%lX)", hr);
         return hr;
     }
 
@@ -125,7 +125,7 @@ static HRESULT TimeGet(aout_stream_t *s, vlc_tick_t *restrict delay)
     IAudioClock_Release(clock);
     if (FAILED(hr))
     {
-        msg_Err(s, "cannot get position (error 0x%lx)", hr);
+        msg_Err(s, "cannot get position (error 0x%lX)", hr);
         return hr;
     }
 
@@ -153,7 +153,7 @@ static HRESULT Play(aout_stream_t *s, block_t *block)
     hr = IAudioClient_GetService(sys->client, &IID_IAudioRenderClient, &pv);
     if (FAILED(hr))
     {
-        msg_Err(s, "cannot get render client (error 0x%lx)", hr);
+        msg_Err(s, "cannot get render client (error 0x%lX)", hr);
         goto out;
     }
 
@@ -164,7 +164,7 @@ static HRESULT Play(aout_stream_t *s, block_t *block)
         hr = IAudioClient_GetCurrentPadding(sys->client, &frames);
         if (FAILED(hr))
         {
-            msg_Err(s, "cannot get current padding (error 0x%lx)", hr);
+            msg_Err(s, "cannot get current padding (error 0x%lX)", hr);
             break;
         }
 
@@ -177,7 +177,7 @@ static HRESULT Play(aout_stream_t *s, block_t *block)
         hr = IAudioRenderClient_GetBuffer(render, frames, &dst);
         if (FAILED(hr))
         {
-            msg_Err(s, "cannot get buffer (error 0x%lx)", hr);
+            msg_Err(s, "cannot get buffer (error 0x%lX)", hr);
             break;
         }
 
@@ -187,7 +187,7 @@ static HRESULT Play(aout_stream_t *s, block_t *block)
         hr = IAudioRenderClient_ReleaseBuffer(render, frames, 0);
         if (FAILED(hr))
         {
-            msg_Err(s, "cannot release buffer (error 0x%lx)", hr);
+            msg_Err(s, "cannot release buffer (error 0x%lX)", hr);
             break;
         }
         IAudioClient_Start(sys->client);
@@ -219,7 +219,7 @@ static HRESULT Pause(aout_stream_t *s, bool paused)
     else
         hr = IAudioClient_Start(sys->client);
     if (FAILED(hr))
-        msg_Warn(s, "cannot %s stream (error 0x%lx)",
+        msg_Warn(s, "cannot %s stream (error 0x%lX)",
                  paused ? "stop" : "start", hr);
     return hr;
 }
@@ -238,7 +238,7 @@ static HRESULT Flush(aout_stream_t *s)
         sys->written = 0;
     }
     else
-        msg_Warn(s, "cannot reset stream (error 0x%lx)", hr);
+        msg_Warn(s, "cannot reset stream (error 0x%lX)", hr);
     return hr;
 }
 
@@ -494,7 +494,7 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict pfmt,
     HRESULT hr = aout_stream_Activate(s, &IID_IAudioClient, NULL, &pv);
     if (FAILED(hr))
     {
-        msg_Err(s, "cannot activate client (error 0x%lx)", hr);
+        msg_Err(s, "cannot activate client (error 0x%lX)", hr);
         goto error;
     }
     sys->client = pv;
@@ -552,13 +552,13 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict pfmt,
         if (pfmt->i_format == VLC_CODEC_DTS && b_hdmi)
         {
             msg_Warn(s, "cannot negotiate DTS at 768khz IEC958 rate (HDMI), "
-                     "fallback to 48kHz (S/PDIF) (error 0x%lx)", hr);
+                     "fallback to 48kHz (S/PDIF) (error 0x%lX)", hr);
             IAudioClient_Release(sys->client);
             free(sys);
             var_SetBool(vlc_object_parent(s), "dtshd", false);
             return Start(s, pfmt, sid);
         }
-        msg_Err(s, "cannot negotiate audio format (error 0x%lx)%s", hr,
+        msg_Err(s, "cannot negotiate audio format (error 0x%lX)%s", hr,
                 hr == AUDCLNT_E_UNSUPPORTED_FORMAT
                 && fmt.i_format == VLC_CODEC_SPDIFL ?
                 ": digital pass-through not supported" : "");
@@ -593,14 +593,14 @@ static HRESULT Start(aout_stream_t *s, audio_sample_format_t *restrict pfmt,
     CoTaskMemFree(pwf_closest);
     if (FAILED(hr))
     {
-        msg_Err(s, "cannot initialize audio client (error 0x%lx)", hr);
+        msg_Err(s, "cannot initialize audio client (error 0x%lX)", hr);
         goto error;
     }
 
     hr = IAudioClient_GetBufferSize(sys->client, &sys->frames);
     if (FAILED(hr))
     {
-        msg_Err(s, "cannot get buffer size (error 0x%lx)", hr);
+        msg_Err(s, "cannot get buffer size (error 0x%lX)", hr);
         goto error;
     }
     msg_Dbg(s, "buffer size    : %"PRIu32" frames", sys->frames);
diff --git a/modules/audio_output/winstore.c b/modules/audio_output/winstore.c
index 8ad1fa431f..8cce31125f 100644
--- a/modules/audio_output/winstore.c
+++ b/modules/audio_output/winstore.c
@@ -91,14 +91,14 @@ static int VolumeSet(audio_output_t *aout, float vol)
     hr = IAudioClient_GetService(sys->client, &IID_ISimpleAudioVolume, &pc_AudioVolume);
     if (FAILED(hr))
     {
-        msg_Err(aout, "cannot get volume service (error 0x%lx)", hr);
+        msg_Err(aout, "cannot get volume service (error 0x%lX)", hr);
         goto done;
     }
 
     hr = ISimpleAudioVolume_SetMasterVolume(pc_AudioVolume, vol, NULL);
     if (FAILED(hr))
     {
-        msg_Err(aout, "cannot set volume (error 0x%lx)", hr);
+        msg_Err(aout, "cannot set volume (error 0x%lX)", hr);
         goto done;
     }
 
@@ -119,14 +119,14 @@ static int MuteSet(audio_output_t *aout, bool mute)
     hr = IAudioClient_GetService(sys->client, &IID_ISimpleAudioVolume, &pc_AudioVolume);
     if (FAILED(hr))
     {
-        msg_Err(aout, "cannot get volume service (error 0x%lx)", hr);
+        msg_Err(aout, "cannot get volume service (error 0x%lX)", hr);
         goto done;
     }
 
     hr = ISimpleAudioVolume_SetMute(pc_AudioVolume, mute, NULL);
     if (FAILED(hr))
     {
-        msg_Err(aout, "cannot set mute (error 0x%lx)", hr);
+        msg_Err(aout, "cannot set mute (error 0x%lX)", hr);
         goto done;
     }
 
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 447de543c7..141a039ef2 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -807,7 +807,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
                                                                  &viewDesc,
                                                                  &p_sys->decoder );
             if (FAILED(hr)) {
-                msg_Warn(va, "CreateVideoDecoderOutputView %d failed. (hr=0x%0lx)", surface_idx, hr);
+                msg_Warn(va, "CreateVideoDecoderOutputView %d failed. (hr=0x%lX)", surface_idx, hr);
                 dx_sys->can_extern_pool = false;
                 break;
             }
@@ -861,7 +861,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
         ID3D11Texture2D *p_texture;
         hr = ID3D11Device_CreateTexture2D( sys->d3d_dev.d3ddevice, &texDesc, NULL, &p_texture );
         if (FAILED(hr)) {
-            msg_Err(va, "CreateTexture2D %d failed. (hr=0x%0lx)", surface_count, hr);
+            msg_Err(va, "CreateTexture2D %d failed. (hr=0x%lX)", surface_count, hr);
             return VLC_EGENERIC;
         }
 
@@ -875,7 +875,7 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id,
                                                                  &viewDesc,
                                                                  &dx_sys->hw_surface[surface_idx] );
             if (FAILED(hr)) {
-                msg_Err(va, "CreateVideoDecoderOutputView %d failed. (hr=0x%0lx)", surface_idx, hr);
+                msg_Err(va, "CreateVideoDecoderOutputView %d failed. (hr=0x%lX)", surface_idx, hr);
                 ID3D11Texture2D_Release(p_texture);
                 return VLC_EGENERIC;
             }
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index c26ad2a894..9471cb5be1 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -601,7 +601,7 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id,
                                                          sys->hw_surface,
                                                          NULL);
     if (FAILED(hr)) {
-        msg_Err(va, "IDirectXVideoAccelerationService_CreateSurface %d failed (hr=0x%0lx)", surface_count - 1, hr);
+        msg_Err(va, "IDirectXVideoAccelerationService_CreateSurface %d failed (hr=0x%lX)", surface_count - 1, hr);
         return VLC_EGENERIC;
     }
     msg_Dbg(va, "IDirectXVideoAccelerationService_CreateSurface succeed with %d surfaces (%dx%d)",
@@ -619,7 +619,7 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id,
                                                          &tstCrash,
                                                          NULL);
     if (FAILED(hr)) {
-        msg_Err(va, "extra buffer impossible, avoid a crash (hr=0x%0lx)", hr);
+        msg_Err(va, "extra buffer impossible, avoid a crash (hr=0x%lX)", hr);
         goto error;
     }
     IDirect3DSurface9_Release(tstCrash);
@@ -661,7 +661,7 @@ static int DxCreateVideoDecoder(vlc_va_t *va, int codec_id,
                                                               &cfg_count,
                                                               &cfg_list);
     if (FAILED(hr)) {
-        msg_Err(va, "IDirectXVideoDecoderService_GetDecoderConfigurations failed. (hr=0x%0lx)", hr);
+        msg_Err(va, "IDirectXVideoDecoderService_GetDecoderConfigurations failed. (hr=0x%lX)", hr);
         goto error;
     }
     msg_Dbg(va, "we got %d decoder configurations", cfg_count);
diff --git a/modules/hw/d3d11/d3d11_deinterlace.c b/modules/hw/d3d11/d3d11_deinterlace.c
index f27a7b355c..939402aa3d 100644
--- a/modules/hw/d3d11/d3d11_deinterlace.c
+++ b/modules/hw/d3d11/d3d11_deinterlace.c
@@ -424,7 +424,7 @@ int D3D11OpenDeinterlace(vlc_object_t *obj)
 
     hr = ID3D11Device_CreateTexture2D( sys->d3d_dev.d3ddevice, &texDesc, NULL, &sys->outTexture );
     if (FAILED(hr)) {
-        msg_Err(filter, "CreateTexture2D failed. (hr=0x%0lx)", hr);
+        msg_Err(filter, "CreateTexture2D failed. (hr=0x%lX)", hr);
         goto error;
     }
 
diff --git a/modules/hw/d3d11/d3d11_filters.c b/modules/hw/d3d11/d3d11_filters.c
index 1a23d072da..ae159a0d08 100644
--- a/modules/hw/d3d11/d3d11_filters.c
+++ b/modules/hw/d3d11/d3d11_filters.c
@@ -446,13 +446,13 @@ static int D3D11OpenAdjust(vlc_object_t *obj)
 
     hr = ID3D11Device_CreateTexture2D( sys->d3d_dev.d3ddevice, &texDesc, NULL, &sys->out[0].texture );
     if (FAILED(hr)) {
-        msg_Err(filter, "CreateTexture2D failed. (hr=0x%0lx)", hr);
+        msg_Err(filter, "CreateTexture2D failed. (hr=0x%lX)", hr);
         goto error;
     }
     hr = ID3D11Device_CreateTexture2D( sys->d3d_dev.d3ddevice, &texDesc, NULL, &sys->out[1].texture );
     if (FAILED(hr)) {
         ID3D11Texture2D_Release(sys->out[0].texture);
-        msg_Err(filter, "CreateTexture2D failed. (hr=0x%0lx)", hr);
+        msg_Err(filter, "CreateTexture2D failed. (hr=0x%lX)", hr);
         goto error;
     }
 
diff --git a/modules/hw/d3d11/d3d11_surface.c b/modules/hw/d3d11/d3d11_surface.c
index d59e74def6..71cb28cccc 100644
--- a/modules/hw/d3d11/d3d11_surface.c
+++ b/modules/hw/d3d11/d3d11_surface.c
@@ -178,7 +178,7 @@ static int assert_staging(filter_t *p_filter, picture_sys_d3d11_t *p_sys)
     hr = ID3D11Device_CreateTexture2D( d3d_dev.d3ddevice, &texDesc, NULL, &sys->staging);
     /* test if mapping the texture works ref #18746 */
     if (SUCCEEDED(hr) && FAILED(hr = can_map(sys, p_sys->context)))
-        msg_Dbg(p_filter, "can't map default staging texture (hr=0x%0lx)", hr);
+        msg_Dbg(p_filter, "can't map default staging texture (hr=0x%lX)", hr);
 #if CAN_PROCESSOR
     if (FAILED(hr)) {
         /* failed with the this format, try a different one */
@@ -211,7 +211,7 @@ static int assert_staging(filter_t *p_filter, picture_sys_d3d11_t *p_sys)
                 }
                 else
                 {
-                    msg_Dbg(p_filter, "can't create intermediate texture (hr=0x%0lx)", hr);
+                    msg_Dbg(p_filter, "can't create intermediate texture (hr=0x%lX)", hr);
                     ID3D11Texture2D_Release(sys->staging);
                     sys->staging = NULL;
                 }
@@ -221,7 +221,7 @@ static int assert_staging(filter_t *p_filter, picture_sys_d3d11_t *p_sys)
 #endif
     ID3D11Device_Release(d3d_dev.d3ddevice);
     if (FAILED(hr)) {
-        msg_Err(p_filter, "Failed to create a %s staging texture to extract surface pixels (hr=0x%0lx)", DxgiFormatToStr(texDesc.Format), hr );
+        msg_Err(p_filter, "Failed to create a %s staging texture to extract surface pixels (hr=0x%lX)", DxgiFormatToStr(texDesc.Format), hr );
         return VLC_EGENERIC;
     }
 ok:
@@ -297,7 +297,7 @@ static void D3D11_YUY2(filter_t *p_filter, picture_t *src, picture_t *dst)
     HRESULT hr = ID3D11DeviceContext_Map(p_sys->context, sys->staging_resource,
                                          0, D3D11_MAP_READ, 0, &lock);
     if (FAILED(hr)) {
-        msg_Err(p_filter, "Failed to map source surface. (hr=0x%0lx)", hr);
+        msg_Err(p_filter, "Failed to map source surface. (hr=0x%lX)", hr);
         vlc_mutex_unlock(&sys->staging_lock);
         return;
     }
@@ -425,7 +425,7 @@ static void D3D11_NV12(filter_t *p_filter, picture_t *src, picture_t *dst)
     HRESULT hr = ID3D11DeviceContext_Map(p_sys->context, sys->staging_resource,
                                          0, D3D11_MAP_READ, 0, &lock);
     if (FAILED(hr)) {
-        msg_Err(p_filter, "Failed to map source surface. (hr=0x%0lx)", hr);
+        msg_Err(p_filter, "Failed to map source surface. (hr=0x%lX)", hr);
         vlc_mutex_unlock(&sys->staging_lock);
         return;
     }
@@ -478,7 +478,7 @@ static void D3D11_RGBA(filter_t *p_filter, picture_t *src, picture_t *dst)
     HRESULT hr = ID3D11DeviceContext_Map(p_sys->context, sys->staging_resource,
                                          0, D3D11_MAP_READ, 0, &lock);
     if (FAILED(hr)) {
-        msg_Err(p_filter, "Failed to map source surface. (hr=0x%0lx)", hr);
+        msg_Err(p_filter, "Failed to map source surface. (hr=0x%lX)", hr);
         vlc_mutex_unlock(&sys->staging_lock);
         return;
     }
@@ -591,7 +591,7 @@ static void NV12_D3D11(filter_t *p_filter, picture_t *src, picture_t *dst)
     HRESULT hr = ID3D11DeviceContext_Map(p_sys->context, p_staging_sys->resource[KNOWN_DXGI_INDEX],
                                          0, D3D11_MAP_WRITE, 0, &lock);
     if (FAILED(hr)) {
-        msg_Err(p_filter, "Failed to map source surface. (hr=0x%0lx)", hr);
+        msg_Err(p_filter, "Failed to map source surface. (hr=0x%lX)", hr);
         return;
     }
 
@@ -781,7 +781,7 @@ int D3D11OpenCPUConverter( vlc_object_t *obj )
 
     HRESULT hr = ID3D11Device_CreateTexture2D( d3d_dev.d3ddevice, &texDesc, NULL, &texture);
     if (FAILED(hr)) {
-        msg_Err(p_filter, "Failed to create a %s staging texture to extract surface pixels (hr=0x%0lx)", DxgiFormatToStr(texDesc.Format), hr );
+        msg_Err(p_filter, "Failed to create a %s staging texture to extract surface pixels (hr=0x%lX)", DxgiFormatToStr(texDesc.Format), hr );
         goto done;
     }
 
diff --git a/modules/hw/d3d9/dxa9.c b/modules/hw/d3d9/dxa9.c
index 3b571d779d..5d1e0fa5be 100644
--- a/modules/hw/d3d9/dxa9.c
+++ b/modules/hw/d3d9/dxa9.c
@@ -441,7 +441,7 @@ int D3D9OpenCPUConverter( vlc_object_t *obj )
                                                           &texture,
                                                           NULL);
         if (FAILED(hr)) {
-            msg_Err(p_filter, "Failed to create a %4.4s staging texture to extract surface pixels (hr=0x%0lx)", (char *)texDesc.Format, hr );
+            msg_Err(p_filter, "Failed to create a %4.4s staging texture to extract surface pixels (hr=0x%lX)", (char *)texDesc.Format, hr );
             goto done;
         }
         res_sys->surface = texture;
diff --git a/modules/text_renderer/sapi.cpp b/modules/text_renderer/sapi.cpp
index 4275df6fc3..874f5c8314 100644
--- a/modules/text_renderer/sapi.cpp
+++ b/modules/text_renderer/sapi.cpp
@@ -74,7 +74,7 @@ static int TryEnterMTA(vlc_object_t *obj)
     HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
     if (unlikely(FAILED(hr)))
     {
-        msg_Err (obj, "cannot initialize COM (error 0x%lx)", hr);
+        msg_Err (obj, "cannot initialize COM (error 0x%lX)", hr);
         return -1;
     }
     return 0;
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 00151df868..19ad189575 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -653,7 +653,7 @@ int AllocateTextures( vlc_object_t *obj, d3d11_device_t *d3d_dev,
 
         hr = ID3D11Device_CreateTexture2D( d3d_dev->d3ddevice, &texDesc, NULL, &slicedTexture );
         if (FAILED(hr)) {
-            msg_Err(obj, "CreateTexture2D failed for the %d pool. (hr=0x%0lx)", pool_size, hr);
+            msg_Err(obj, "CreateTexture2D failed for the %d pool. (hr=0x%lX)", pool_size, hr);
             goto error;
         }
     }
@@ -669,7 +669,7 @@ int AllocateTextures( vlc_object_t *obj, d3d11_device_t *d3d_dev,
                 texDesc.Width = fmt->i_width * p_chroma_desc->p[plane].w.num / p_chroma_desc->p[plane].w.den;
                 hr = ID3D11Device_CreateTexture2D( d3d_dev->d3ddevice, &texDesc, NULL, &textures[picture_count * D3D11_MAX_SHADER_VIEW + plane] );
                 if (FAILED(hr)) {
-                    msg_Err(obj, "CreateTexture2D failed for the %d pool. (hr=0x%0lx)", pool_size, hr);
+                    msg_Err(obj, "CreateTexture2D failed for the %d pool. (hr=0x%lX)", pool_size, hr);
                     goto error;
                 }
             }
diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c
index cbcda643d9..0f33544925 100644
--- a/modules/video_chroma/d3d9_fmt.c
+++ b/modules/video_chroma/d3d9_fmt.c
@@ -59,10 +59,10 @@ HRESULT D3D9_CreateDevice(vlc_object_t *o, d3d9_handle_t *hd3d, HWND hwnd,
     ZeroMemory(&out->caps, sizeof(out->caps));
     hr = IDirect3D9_GetDeviceCaps(hd3d->obj, AdapterToUse, DeviceType, &out->caps);
     if (FAILED(hr)) {
-       msg_Err(o, "Could not read adapter capabilities. (hr=0x%0lx)", hr);
+       msg_Err(o, "Could not read adapter capabilities. (hr=0x%lX)", hr);
        return hr;
     }
-    msg_Dbg(o, "D3D9 device caps 0x%0lX / 0x%0lX", out->caps.DevCaps, out->caps.DevCaps2);
+    msg_Dbg(o, "D3D9 device caps 0x%lX / 0x%lX", out->caps.DevCaps, out->caps.DevCaps2);
 
     /* TODO: need to test device capabilities and select the right render function */
     if (!(out->caps.DevCaps2 & D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES)) {
diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 0c5ad92995..b31c77d0be 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -192,7 +192,7 @@ static void CommonChangeThumbnailClip(vlc_object_t *obj, vout_display_sys_win32_
         hr = taskbl->lpVtbl->SetThumbnailClip(taskbl, hroot,
                                                  show ? &video : NULL);
         if ( hr != S_OK )
-            msg_Err(obj, "SetThumbNailClip failed: 0x%0lx", hr);
+            msg_Err(obj, "SetThumbNailClip failed: 0x%lX", hr);
 
         taskbl->lpVtbl->Release(taskbl);
     }
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 796c7f830c..cd10d7199f 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -269,7 +269,7 @@ static picture_pool_t *Direct3D9CreatePicturePool(vlc_object_t *o,
                                                           &picsys->surface,
                                                           NULL);
         if (FAILED(hr)) {
-           msg_Err(o, "Failed to allocate surface %d (hr=0x%0lx)", picture_count, hr);
+           msg_Err(o, "Failed to allocate surface %d (hr=0x%lX)", picture_count, hr);
            free(picsys);
            goto error;
         }
@@ -449,7 +449,7 @@ static int Direct3D9ImportPicture(vout_display_t *vd,
     IDirect3DSurface9 *destination;
     hr = IDirect3DTexture9_GetSurfaceLevel(sys->sceneTexture, 0, &destination);
     if (FAILED(hr)) {
-        msg_Dbg(vd, "Failed IDirect3DTexture9_GetSurfaceLevel: 0x%0lx", hr);
+        msg_Dbg(vd, "Failed IDirect3DTexture9_GetSurfaceLevel: 0x%lX", hr);
         return VLC_EGENERIC;
     }
 
@@ -486,7 +486,7 @@ static int Direct3D9ImportPicture(vout_display_t *vd,
                                       D3DTEXF_NONE);
     IDirect3DSurface9_Release(destination);
     if (FAILED(hr)) {
-        msg_Dbg(vd, "Failed StretchRect: source 0x%p 0x%0lx",
+        msg_Dbg(vd, "Failed StretchRect: source 0x%p 0x%lX",
                 (LPVOID)source, hr);
         return VLC_EGENERIC;
     }
@@ -658,7 +658,7 @@ static int Direct3D9CreateScene(vout_display_t *vd, const video_format_t *fmt)
                                         &sys->sceneTexture,
                                         NULL);
     if (FAILED(hr)) {
-        msg_Err(vd, "Failed to create texture. (hr=0x%lx)", hr);
+        msg_Err(vd, "Failed to create texture. (hr=0x%lX)", hr);
         return VLC_EGENERIC;
     }
 
@@ -678,7 +678,7 @@ static int Direct3D9CreateScene(vout_display_t *vd, const video_format_t *fmt)
                                              &sys->sceneVertexBuffer,
                                              NULL);
     if (FAILED(hr)) {
-        msg_Err(vd, "Failed to create vertex buffer. (hr=0x%lx)", hr);
+        msg_Err(vd, "Failed to create vertex buffer. (hr=0x%lX)", hr);
         IDirect3DTexture9_Release(sys->sceneTexture);
         sys->sceneTexture = NULL;
         return VLC_EGENERIC;
@@ -784,7 +784,7 @@ static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source,
                 "main", "ps_3_0", shader_flags, &compiled_shader, &error_msgs, NULL);
 
     if (FAILED(hr)) {
-        msg_Warn(vd, "D3DXCompileShader Error (hr=0x%0lx)", hr);
+        msg_Warn(vd, "D3DXCompileShader Error (hr=0x%lX)", hr);
         if (error_msgs) {
             msg_Warn(vd, "HLSL Compilation Error: %s", (char*)ID3DXBuffer_GetBufferPointer(error_msgs));
             ID3DXBuffer_Release(error_msgs);
@@ -802,7 +802,7 @@ static int Direct3D9CompileShader(vout_display_t *vd, const char *shader_source,
         ID3DXBuffer_Release(error_msgs);
 
     if (FAILED(hr)) {
-        msg_Warn(vd, "IDirect3DDevice9_CreatePixelShader error (hr=0x%0lx)", hr);
+        msg_Warn(vd, "IDirect3DDevice9_CreatePixelShader error (hr=0x%lX)", hr);
         return VLC_EGENERIC;
     }
     return VLC_SUCCESS;
@@ -929,7 +929,7 @@ static int Direct3D9CreateResources(vout_display_t *vd, video_format_t *fmt)
                                                           &sys->dx_render,
                                                           NULL);
         if (FAILED(hr)) {
-           msg_Err(vd, "Failed to allocate offscreen surface (hr=0x%0lx)", hr);
+           msg_Err(vd, "Failed to allocate offscreen surface (hr=0x%lX)", hr);
            return VLC_EGENERIC;
         }
     }
@@ -962,7 +962,7 @@ static int Direct3D9Reset(vout_display_t *vd, video_format_t *fmtp)
         hr = IDirect3DDevice9_Reset(p_d3d9_dev->dev, &p_d3d9_dev->pp);
     }
     if (FAILED(hr)) {
-        msg_Err(vd, "IDirect3DDevice9_Reset failed! (hr=0x%0lx)", hr);
+        msg_Err(vd, "IDirect3DDevice9_Reset failed! (hr=0x%lX)", hr);
         return VLC_EGENERIC;
     }
 
@@ -1022,7 +1022,7 @@ static void Direct3D9ImportSubpicture(vout_display_t *vd,
                                                 NULL);
             if (FAILED(hr)) {
                 d3dr->texture = NULL;
-                msg_Err(vd, "Failed to create %dx%d texture for OSD (hr=0x%0lx)",
+                msg_Err(vd, "Failed to create %dx%d texture for OSD (hr=0x%lX)",
                         d3dr->width, d3dr->height, hr);
                 continue;
             }
@@ -1113,13 +1113,13 @@ static int Direct3D9RenderRegion(vout_display_t *vd,
     void *vertex;
     hr = IDirect3DVertexBuffer9_Lock(sys->sceneVertexBuffer, 0, 0, &vertex, D3DLOCK_DISCARD);
     if (FAILED(hr)) {
-        msg_Dbg(vd, "Failed IDirect3DVertexBuffer9_Lock: 0x%0lx", hr);
+        msg_Dbg(vd, "Failed IDirect3DVertexBuffer9_Lock: 0x%lX", hr);
         return -1;
     }
     memcpy(vertex, region->vertex, sizeof(region->vertex));
     hr = IDirect3DVertexBuffer9_Unlock(sys->sceneVertexBuffer);
     if (FAILED(hr)) {
-        msg_Dbg(vd, "Failed IDirect3DVertexBuffer9_Unlock: 0x%0lx", hr);
+        msg_Dbg(vd, "Failed IDirect3DVertexBuffer9_Unlock: 0x%lX", hr);
         return -1;
     }
 
@@ -1129,7 +1129,7 @@ static int Direct3D9RenderRegion(vout_display_t *vd,
     // (blending) our texture with the diffuse color of the vertices.
     hr = IDirect3DDevice9_SetTexture(d3ddev, 0, (IDirect3DBaseTexture9*)region->texture);
     if (FAILED(hr)) {
-        msg_Dbg(vd, "Failed SetTexture: 0x%0lx", hr);
+        msg_Dbg(vd, "Failed SetTexture: 0x%lX", hr);
         return -1;
     }
 
@@ -1140,14 +1140,14 @@ static int Direct3D9RenderRegion(vout_display_t *vd,
             float shader_data[4] = { region->width, region->height, 0, 0 };
             hr = IDirect3DDevice9_SetPixelShaderConstantF(d3ddev, 0, shader_data, 1);
             if (FAILED(hr)) {
-                msg_Dbg(vd, "Failed SetPixelShaderConstantF: 0x%0lx", hr);
+                msg_Dbg(vd, "Failed SetPixelShaderConstantF: 0x%lX", hr);
                 return -1;
             }
         }
         else /* Disable any existing pixel shader. */
             hr = IDirect3DDevice9_SetPixelShader(d3ddev, NULL);
         if (FAILED(hr)) {
-            msg_Dbg(vd, "Failed SetPixelShader: 0x%0lx", hr);
+            msg_Dbg(vd, "Failed SetPixelShader: 0x%lX", hr);
             return -1;
         }
     }
@@ -1155,21 +1155,21 @@ static int Direct3D9RenderRegion(vout_display_t *vd,
     // Render the vertex buffer contents
     hr = IDirect3DDevice9_SetStreamSource(d3ddev, 0, sys->sceneVertexBuffer, 0, sizeof(CUSTOMVERTEX));
     if (FAILED(hr)) {
-        msg_Dbg(vd, "Failed SetStreamSource: 0x%0lx", hr);
+        msg_Dbg(vd, "Failed SetStreamSource: 0x%lX", hr);
         return -1;
     }
 
     // we use FVF instead of vertex shader
     hr = IDirect3DDevice9_SetFVF(d3ddev, D3DFVF_CUSTOMVERTEX);
     if (FAILED(hr)) {
-        msg_Dbg(vd, "Failed SetFVF: 0x%0lx", hr);
+        msg_Dbg(vd, "Failed SetFVF: 0x%lX", hr);
         return -1;
     }
 
     // draw rectangle
     hr = IDirect3DDevice9_DrawPrimitive(d3ddev, D3DPT_TRIANGLEFAN, 0, 2);
     if (FAILED(hr)) {
-        msg_Dbg(vd, "Failed DrawPrimitive: 0x%0lx", hr);
+        msg_Dbg(vd, "Failed DrawPrimitive: 0x%lX", hr);
         return -1;
     }
     return 0;
@@ -1186,7 +1186,7 @@ static bool StartRendering(vout_display_t *vd)
         hr = IDirect3DDevice9_Clear(d3ddev, 0, NULL, D3DCLEAR_TARGET,
                                   D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
         if (FAILED(hr)) {
-            msg_Dbg(vd, "Failed Clear: 0x%0lx", hr);
+            msg_Dbg(vd, "Failed Clear: 0x%lX", hr);
             return false;
         }
         sys->clear_scene = false;
@@ -1195,7 +1195,7 @@ static bool StartRendering(vout_display_t *vd)
     // Begin the scene
     hr = IDirect3DDevice9_BeginScene(d3ddev);
     if (FAILED(hr)) {
-        msg_Dbg(vd, "Failed BeginScene: 0x%0lx", hr);
+        msg_Dbg(vd, "Failed BeginScene: 0x%lX", hr);
         return false;
     }
     return true;
@@ -1210,7 +1210,7 @@ static void EndRendering(vout_display_t *vd)
     // End the scene
     hr = IDirect3DDevice9_EndScene(d3ddev);
     if (FAILED(hr))
-        msg_Dbg(vd, "Failed EndScene: 0x%0lx", hr);
+        msg_Dbg(vd, "Failed EndScene: 0x%lX", hr);
 }
 
 /**
@@ -1321,7 +1321,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture,
 
                 hr = IDirect3DDevice9_StretchRect( p_d3d9_dev->dev, pic_ctx->picsys.surface, &visibleSource, surface, &visibleSource, D3DTEXF_NONE);
                 if (FAILED(hr)) {
-                    msg_Err(vd, "Failed to copy the hw surface to the decoder surface (hr=0x%0lx)", hr );
+                    msg_Err(vd, "Failed to copy the hw surface to the decoder surface (hr=0x%lX)", hr );
                 }
             }
         }
@@ -1383,7 +1383,7 @@ static void Swap(vout_display_t *vd)
         hr = IDirect3DDevice9_Present(p_d3d9_dev->dev, &src, &src, NULL, NULL);
     }
     if (FAILED(hr)) {
-        msg_Dbg(vd, "Failed Present: 0x%0lx", hr);
+        msg_Dbg(vd, "Failed Present: 0x%lX", hr);
     }
 }
 
@@ -1439,7 +1439,7 @@ static int Direct3D9CheckConversion(vout_display_t *vd,
     }
     if (!SUCCEEDED(hr)) {
         if (D3DERR_NOTAVAILABLE != hr)
-            msg_Err(vd, "Could not query adapter supported formats. (hr=0x%0lx)", hr);
+            msg_Err(vd, "Could not query adapter supported formats. (hr=0x%lX)", hr);
         return VLC_EGENERIC;
     }
     return VLC_SUCCESS;
@@ -1523,7 +1523,7 @@ static int Direct3D9Open(vout_display_t *vd, video_format_t *fmt,
                                &vd->source, &sys->d3d_dev);
 
     if (FAILED(hr)) {
-        msg_Err( vd, "D3D9 Creation failed! (hr=0x%0lx)", hr);
+        msg_Err( vd, "D3D9 Creation failed! (hr=0x%lX)", hr);
         return VLC_EGENERIC;
     }
 




More information about the vlc-commits mailing list