OpenGL: Trying a new function to fix glScissor() and glViewport() when bpmem.copyTexSrcWH is not 640x480. It's only enabled with g_Config.bStretchToFit and without g_Config.bKeepAR to test how it works. Hopefully I have not broken all other modes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2310 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-02-19 06:52:01 +00:00
parent 14ab646978
commit 5746ed490c
8 changed files with 207 additions and 71 deletions

View File

@ -263,7 +263,7 @@ namespace EmuWindow
}
// This is called from
// This is called from Create()
HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const TCHAR *title)
{
wndClass.cbSize = sizeof( wndClass );
@ -273,8 +273,9 @@ namespace EmuWindow
wndClass.cbWndExtra = 0;
wndClass.hInstance = hInstance;
wndClass.hIcon = LoadIcon( NULL, IDI_APPLICATION );
// To interfer less with SetCursor() later we set this to NULL
//wndClass.hCursor = LoadCursor( NULL, IDC_ARROW );
wndClass.hCursor = NULL; // To interfer less with SetCursor() later
wndClass.hCursor = NULL;
wndClass.hbrBackground = (HBRUSH)GetStockObject( BLACK_BRUSH );
wndClass.lpszMenuName = NULL;
wndClass.lpszClassName = m_szClassName;
@ -295,7 +296,7 @@ namespace EmuWindow
CW_USEDEFAULT, CW_USEDEFAULT,CW_USEDEFAULT, CW_USEDEFAULT,
parent, NULL, hInstance, NULL );
ShowWindow(m_hWnd, SW_SHOWMAXIMIZED);
ShowWindow(m_hWnd, SW_SHOWMAXIMIZED);
}
// Create new separate window
@ -357,7 +358,9 @@ namespace EmuWindow
UnregisterClass(m_szClassName, m_hInstance);
}
// ------------------------------------------
// Set the size of the child or main window
// ------------------
void SetSize(int width, int height)
{
RECT rc = {0, 0, width, height};
@ -366,6 +369,7 @@ namespace EmuWindow
int w = rc.right - rc.left;
int h = rc.bottom - rc.top;
// Move and resize the window
rc.left = (1280 - w)/2;
rc.right = rc.left + w;
rc.top = (1024 - h)/2;