Fix Coverity - High Impact defects:

. uninitialised vars in Debug & Win32Frame
This commit is contained in:
tomcw
2021-07-28 12:47:05 +01:00
parent f4650fb850
commit 405de2be14
2 changed files with 11 additions and 13 deletions
+6 -6
View File
@@ -40,6 +40,11 @@ Win32Frame::Win32Frame()
m_bestHeightForFullScreen = 0;
m_changedDisplaySettings = false;
g_nViewportCX = GetVideo().GetFrameBufferBorderlessWidth() * kDEFAULT_VIEWPORT_SCALE;
g_nViewportCY = GetVideo().GetFrameBufferBorderlessHeight() * kDEFAULT_VIEWPORT_SCALE;
g_nViewportScale = kDEFAULT_VIEWPORT_SCALE; // saved REGSAVE
g_nMaxViewportScale = kDEFAULT_VIEWPORT_SCALE; // Max scale in Windowed mode with borders, buttons etc (full-screen may be +1)
btnfacebrush = (HBRUSH)0;
btnfacepen = (HPEN)0;
btnhighlightpen = (HPEN)0;
@@ -47,7 +52,7 @@ Win32Frame::Win32Frame()
buttonactive = -1;
buttondown = -1;
buttonover = -1;
buttonx = BUTTONX;
buttonx = BUTTONX; // NB. macro uses g_nViewportCX
buttony = BUTTONY;
g_hFrameDC = (HDC)0;
memset(&framerect, 0, sizeof(framerect));
@@ -71,11 +76,6 @@ Win32Frame::Win32Frame()
g_eStatusDrive1 = DISK_STATUS_OFF;
g_eStatusDrive2 = DISK_STATUS_OFF;
g_nViewportCX = GetVideo().GetFrameBufferBorderlessWidth() * kDEFAULT_VIEWPORT_SCALE;
g_nViewportCY = GetVideo().GetFrameBufferBorderlessHeight() * kDEFAULT_VIEWPORT_SCALE;
g_nViewportScale = kDEFAULT_VIEWPORT_SCALE; // saved REGSAVE
g_nMaxViewportScale = kDEFAULT_VIEWPORT_SCALE; // Max scale in Windowed mode with borders, buttons etc (full-screen may be +1)
}
void Win32Frame::videoCreateDIBSection(Video & video)