Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few more issues found from Code Analysis in VS #1184

Closed
wants to merge 10 commits into from
4 changes: 2 additions & 2 deletions xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ bool CAESinkDirectSound::Initialize(AEAudioFormat &format, std::string &device)


LPGUID deviceGUID = NULL; LPGUID deviceGUID = NULL;
RPC_CSTR wszUuid = NULL; RPC_CSTR wszUuid = NULL;
HRESULT hr; HRESULT hr = E_FAIL;
std::list<DSDevice> DSDeviceList; std::list<DSDevice> DSDeviceList;
std::string deviceFriendlyName; std::string deviceFriendlyName;
DirectSoundEnumerate(DSEnumCallback, &DSDeviceList); DirectSoundEnumerate(DSEnumCallback, &DSDeviceList);
Expand All @@ -149,7 +149,7 @@ bool CAESinkDirectSound::Initialize(AEAudioFormat &format, std::string &device)
break; break;
} }
} }
if (hr == RPC_S_OK) RpcStringFree(&wszUuid); if (hr == RPC_S_OK) RpcStringFree(&wszUuid);
} }


hr = DirectSoundCreate(deviceGUID, &m_pDSound, NULL); hr = DirectSoundCreate(deviceGUID, &m_pDSound, NULL);
Expand Down
10 changes: 5 additions & 5 deletions xbmc/guilib/GraphicContext.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -280,14 +280,14 @@ void CGraphicContext::SetFullScreenVideo(bool bOnOff)
if(m_bFullScreenRoot) if(m_bFullScreenRoot)
{ {
if(m_bFullScreenVideo) if(m_bFullScreenVideo)
g_graphicsContext.SetVideoResolution(g_renderManager.GetResolution()); SetVideoResolution(g_renderManager.GetResolution());
else if(g_guiSettings.m_LookAndFeelResolution > RES_DESKTOP) else if(g_guiSettings.m_LookAndFeelResolution > RES_DESKTOP)
g_graphicsContext.SetVideoResolution(g_guiSettings.m_LookAndFeelResolution); SetVideoResolution(g_guiSettings.m_LookAndFeelResolution);
else else
g_graphicsContext.SetVideoResolution(RES_DESKTOP); SetVideoResolution(RES_DESKTOP);
} }
else else
g_graphicsContext.SetVideoResolution(RES_WINDOW); SetVideoResolution(RES_WINDOW);
#endif #endif


Unlock(); Unlock();
Expand Down Expand Up @@ -783,7 +783,7 @@ bool CGraphicContext::ToggleFullScreenRoot ()
uiRes = newRes; uiRes = newRes;


#if defined(HAS_VIDEO_PLAYBACK) #if defined(HAS_VIDEO_PLAYBACK)
if (g_graphicsContext.IsFullScreenVideo() || g_graphicsContext.IsCalibrating()) if (IsFullScreenVideo() || IsCalibrating())
{ {
/* we need to trick renderer that we are fullscreen already so it gives us a valid value */ /* we need to trick renderer that we are fullscreen already so it gives us a valid value */
m_bFullScreenRoot = true; m_bFullScreenRoot = true;
Expand Down
2 changes: 1 addition & 1 deletion xbmc/network/websocket/WebSocketV8.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ const CWebSocketFrame* CWebSocketV8::close(WebSocketCloseReason reason /* = WebS
m_state = WebSocketStateClosed; m_state = WebSocketStateClosed;


CWebSocketFrame* frame = new CWebSocketFrame(WebSocketConnectionClose, data, length); CWebSocketFrame* frame = new CWebSocketFrame(WebSocketConnectionClose, data, length);
delete data; delete[] data;


return frame; return frame;
} }
Expand Down
2 changes: 1 addition & 1 deletion xbmc/rendering/dx/RenderSystemDX.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ bool CRenderSystemDX::BeginRender()
if (!m_bRenderCreated) if (!m_bRenderCreated)
return false; return false;


DWORD oldStatus = m_nDeviceStatus; HRESULT oldStatus = m_nDeviceStatus;
if (m_useD3D9Ex) if (m_useD3D9Ex)
{ {
m_nDeviceStatus = ((IDirect3DDevice9Ex*)m_pD3DDevice)->CheckDeviceState(m_hDeviceWnd); m_nDeviceStatus = ((IDirect3DDevice9Ex*)m_pD3DDevice)->CheckDeviceState(m_hDeviceWnd);
Expand Down