From: Spacy <sp...@us...> - 2006-07-26 13:02:49
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv6015/src/win32 Modified Files: VideoMode.cpp Log Message: Removed restriction of display modes only >= 640x480 Index: VideoMode.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/VideoMode.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** VideoMode.cpp 6 Jun 2006 21:04:21 -0000 1.7 --- VideoMode.cpp 26 Jul 2006 13:02:44 -0000 1.8 *************** *** 101,120 **** static HRESULT WINAPI addVideoMode(LPDDSURFACEDESC2 surf, LPVOID lpContext) { ! HWND h = (HWND)lpContext; ! char buffer[50]; ! ! switch(surf->ddpfPixelFormat.dwRGBBitCount) { ! case 16: ! case 24: ! case 32: ! if(surf->dwWidth >= 640 && surf->dwHeight >= 480) { ! sprintf(buffer, "%4dx%4dx%2d", surf->dwWidth, surf->dwHeight, ! surf->ddpfPixelFormat.dwRGBBitCount); ! WPARAM pos = ::SendMessage(h, LB_ADDSTRING, 0, (LPARAM)buffer); ! ::SendMessage(h, LB_SETITEMDATA, pos, ! (surf->ddpfPixelFormat.dwRGBBitCount << 24) | ! ((surf->dwWidth & 4095) << 12) | ! (surf->dwHeight & 4095)); ! } } --- 101,129 ---- static HRESULT WINAPI addVideoMode(LPDDSURFACEDESC2 surf, LPVOID lpContext) { ! HWND h = (HWND)lpContext; ! char buffer[50]; ! ! switch( surf->ddpfPixelFormat.dwRGBBitCount ) ! { ! case 16: ! case 24: ! case 32: ! sprintf( ! buffer, ! _T("%4dx%4dx%2d"), ! surf->dwWidth, ! surf->dwHeight, ! surf->ddpfPixelFormat.dwRGBBitCount ! ); ! WPARAM pos = ::SendMessage( h, LB_ADDSTRING, 0, (LPARAM)buffer ); ! ::SendMessage( ! h, ! LB_SETITEMDATA, ! pos, ! (surf->ddpfPixelFormat.dwRGBBitCount << 24) | ! ((surf->dwWidth & 4095) << 12) | ! (surf->dwHeight & 4095) ! ); ! break; } *************** *** 310,315 **** // check for available fullscreen modes ! pDirectDraw->EnumDisplayModes(DDEDM_STANDARDVGAMODES, NULL, m_modes.m_hWnd, ! addVideoMode); GetDlgItem(ID_OK)->EnableWindow(FALSE); --- 319,327 ---- // check for available fullscreen modes ! pDirectDraw->EnumDisplayModes( ! DDEDM_STANDARDVGAMODES, ! NULL, ! m_modes.m_hWnd, ! addVideoMode); GetDlgItem(ID_OK)->EnableWindow(FALSE); |