From 697fbdabf10d956e0f13bfbc9414d3db40f0c535 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Sun, 10 Jun 2012 15:28:12 +0200 Subject: BOOL -> bool; additional fixes in constructors/destructors --- src/graphics/d3d/d3denum.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/graphics/d3d/d3denum.cpp') diff --git a/src/graphics/d3d/d3denum.cpp b/src/graphics/d3d/d3denum.cpp index c163bb8..82d79d9 100644 --- a/src/graphics/d3d/d3denum.cpp +++ b/src/graphics/d3d/d3denum.cpp @@ -144,7 +144,7 @@ static HRESULT WINAPI DeviceEnumCallback( TCHAR* strDesc, TCHAR* strName, //? if( strstr(strName, "T&L") != 0 ) return D3DENUMRET_OK; // Avoid duplicates: only enum HW devices for secondary DDraw drivers. - if( NULL != pDeviceInfo->pDriverGUID && FALSE == pDeviceInfo->bHardware ) + if( NULL != pDeviceInfo->pDriverGUID && false == pDeviceInfo->bHardware ) return D3DENUMRET_OK; // Give the app a chance to accept or reject this device. @@ -170,7 +170,7 @@ static HRESULT WINAPI DeviceEnumCallback( TCHAR* strDesc, TCHAR* strName, // Record whether the device has any stereo modes if( ddsdMode.ddsCaps.dwCaps2 & DDSCAPS2_STEREOSURFACELEFT ) - pDeviceInfo->bStereoCompatible = TRUE; + pDeviceInfo->bStereoCompatible = true; } } @@ -206,7 +206,7 @@ static HRESULT WINAPI DeviceEnumCallback( TCHAR* strDesc, TCHAR* strName, // Name: DriverEnumCallback() // Desc: Callback function for enumerating drivers. //----------------------------------------------------------------------------- -static BOOL WINAPI DriverEnumCallback( GUID* pGUID, TCHAR* strDesc, +static bool WINAPI DriverEnumCallback( GUID* pGUID, TCHAR* strDesc, TCHAR* strName, VOID*, HMONITOR ) { D3DEnum_DeviceInfo d3dDeviceInfo; @@ -246,7 +246,7 @@ static BOOL WINAPI DriverEnumCallback( GUID* pGUID, TCHAR* strDesc, // Record whether the device can render into a desktop window if( d3dDeviceInfo.ddDriverCaps.dwCaps2 & DDCAPS2_CANRENDERWINDOWED ) if( NULL == d3dDeviceInfo.pDriverGUID ) - d3dDeviceInfo.bDesktopCompatible = TRUE; + d3dDeviceInfo.bDesktopCompatible = true; // Enumerate the fullscreen display modes. pDD->EnumDisplayModes( 0, NULL, &d3dDeviceInfo, ModeEnumCallback ); @@ -341,8 +341,8 @@ VOID D3DEnum_GetDevices( D3DEnum_DeviceInfo** ppDevices, DWORD* pdwCount ) // select dialog box. //----------------------------------------------------------------------------- static VOID UpdateDialogControls( HWND hDlg, D3DEnum_DeviceInfo* pCurrentDevice, - DWORD dwCurrentMode, BOOL bWindowed, - BOOL bStereo ) + DWORD dwCurrentMode, bool bWindowed, + bool bStereo ) { // Get access to the enumerated device list D3DEnum_DeviceInfo* pDeviceList; @@ -361,8 +361,8 @@ static VOID UpdateDialogControls( HWND hDlg, D3DEnum_DeviceInfo* pCurrentDevice, ComboBox_ResetContent( hwndMode ); // Don't let non-GDI devices be windowed - if( FALSE == pCurrentDevice->bDesktopCompatible ) - bWindowed = FALSE; + if( false == pCurrentDevice->bDesktopCompatible ) + bWindowed = false; // Add a list of devices to the device combo box for( DWORD device = 0; device < dwNumDevices; device++ ) @@ -443,8 +443,8 @@ static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, static D3DEnum_DeviceInfo** ppDeviceArg; static D3DEnum_DeviceInfo* pCurrentDevice; static DWORD dwCurrentMode; - static BOOL bCurrentWindowed; - static BOOL bCurrentStereo; + static bool bCurrentWindowed; + static bool bCurrentStereo; // Get access to the enumerated device list D3DEnum_DeviceInfo* pDeviceList; @@ -457,7 +457,7 @@ static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, // Get the app's current device, passed in as an lParam argument ppDeviceArg = (D3DEnum_DeviceInfo**)lParam; if( NULL == ppDeviceArg ) - return FALSE; + return false; // Setup temp storage pointers for dialog pCurrentDevice = (*ppDeviceArg); @@ -468,7 +468,7 @@ static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, UpdateDialogControls( hDlg, pCurrentDevice, dwCurrentMode, bCurrentWindowed, bCurrentStereo ); - return TRUE; + return true; } else if( WM_COMMAND == uiMsg ) { @@ -481,8 +481,8 @@ static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, DWORD dwDevice = ComboBox_GetCurSel( hwndDevice ); DWORD dwModeItem = ComboBox_GetCurSel( hwndMode ); DWORD dwMode = ComboBox_GetItemData( hwndMode, dwModeItem ); - BOOL bWindowed = hwndWindowed ? Button_GetCheck( hwndWindowed ) : 0; - BOOL bStereo = hwndStereo ? Button_GetCheck( hwndStereo ) : 0; + bool bWindowed = hwndWindowed ? Button_GetCheck( hwndWindowed ) : 0; + bool bStereo = hwndStereo ? Button_GetCheck( hwndStereo ) : 0; D3DEnum_DeviceInfo* pDevice = &pDeviceList[dwDevice]; @@ -505,13 +505,13 @@ static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, else EndDialog( hDlg, IDCANCEL ); - return TRUE; + return true; } else if( IDCANCEL == LOWORD(wParam) ) { // Handle the case when the user hits the Cancel button EndDialog( hDlg, IDCANCEL ); - return TRUE; + return true; } else if( CBN_SELENDOK == HIWORD(wParam) ) { @@ -526,10 +526,10 @@ static INT_PTR CALLBACK ChangeDeviceProc( HWND hDlg, UINT uiMsg, WPARAM wParam, // Keep the UI current UpdateDialogControls( hDlg, &pDeviceList[dwDevice], dwMode, bWindowed, bStereo ); - return TRUE; + return true; } - return FALSE; + return false; } @@ -610,7 +610,7 @@ HRESULT D3DEnum_SelectDefaultDevice( D3DEnum_DeviceInfo** ppDevice, return D3DENUMERR_NOCOMPATIBLEDEVICES; // Set the windowed state of the newly selected device - (*ppDevice)->bWindowed = TRUE; + (*ppDevice)->bWindowed = true; return S_OK; } -- cgit v1.2.3-1-g7c22