mirror of https://github.com/PCSX2/pcsx2.git
zzogl-pg: Mess around with the Windows code a bit more.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3785 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
0c151275eb
commit
6656819a33
|
@ -32,7 +32,6 @@ LRESULT WINAPI MsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
switch (msg)
|
switch (msg)
|
||||||
{
|
{
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -76,21 +75,21 @@ bool GLWindow::CreateWindow(void *pDisplay)
|
||||||
rc.bottom = conf.height;
|
rc.bottom = conf.height;
|
||||||
|
|
||||||
WNDCLASSEX wc;
|
WNDCLASSEX wc;
|
||||||
HINSTANCE hInstance = GetModuleHandle(NULL);
|
HINSTANCE hInstance = GetModuleHandle(NULL); // Grab An Instance For Our Window
|
||||||
DWORD dwExStyle, dwStyle;
|
DWORD dwExStyle, dwStyle;
|
||||||
|
|
||||||
wc.cbSize = sizeof(WNDCLASSEX);
|
wc.cbSize = sizeof(WNDCLASSEX);
|
||||||
wc.style = CS_CLASSDC;
|
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; // Redraw On Move, And Own DC For Window
|
||||||
wc.lpfnWndProc = (WNDPROC) MsgProc;
|
wc.lpfnWndProc = (WNDPROC) MsgProc; // MsgProc Handles Messages
|
||||||
wc.cbClsExtra = 0;
|
wc.cbClsExtra = 0; // No Extra Window Data
|
||||||
wc.cbWndExtra = 0;
|
wc.cbWndExtra = 0; // No Extra Window Data
|
||||||
wc.hInstance = hInstance;
|
wc.hInstance = hInstance; // Set The Instance
|
||||||
wc.hIcon = NULL;
|
wc.hIcon = NULL;
|
||||||
wc.hIconSm = NULL;
|
wc.hIconSm = NULL; // Load The Default Icon
|
||||||
wc.hCursor = NULL;
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW); // Load The Arrow Pointer
|
||||||
wc.hbrBackground = NULL;
|
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); // No Background Required For GL
|
||||||
wc.lpszMenuName = NULL;
|
wc.lpszMenuName = NULL; // We Don't Want A Menu
|
||||||
wc.lpszClassName = "PS2EMU_ZEROGS";
|
wc.lpszClassName = "PS2EMU_ZEROGS"; // Set The Class Name
|
||||||
|
|
||||||
RegisterClassEx(&wc);
|
RegisterClassEx(&wc);
|
||||||
|
|
||||||
|
@ -102,26 +101,26 @@ bool GLWindow::CreateWindow(void *pDisplay)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
|
dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
|
||||||
dwStyle = WS_OVERLAPPEDWINDOW;
|
dwStyle = WS_OVERLAPPEDWINDOW | WS_BORDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dwStyle |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
|
||||||
AdjustWindowRectEx(&rc, dwStyle, false, dwExStyle);
|
AdjustWindowRectEx(&rc, dwStyle, false, dwExStyle);
|
||||||
|
|
||||||
GetWindowRect(GetDesktopWindow(), &rcdesktop);
|
GetWindowRect(GetDesktopWindow(), &rcdesktop);
|
||||||
|
|
||||||
GShwnd = CreateWindowEx(
|
GShwnd = CreateWindowEx( dwExStyle, // Extended Style For The Window
|
||||||
dwExStyle,
|
"PS2EMU_ZEROGS", // Class Name
|
||||||
"PS2EMU_ZEROGS",
|
"ZZOgl", // Window Title
|
||||||
"ZeroGS",
|
dwStyle, // Selected Window Style
|
||||||
dwStyle,
|
(rcdesktop.right - (rc.right - rc.left)) / 2, // Window Position
|
||||||
(rcdesktop.right - (rc.right - rc.left)) / 2,
|
(rcdesktop.bottom - (rc.bottom - rc.top)) / 2, // Window Position
|
||||||
(rcdesktop.bottom - (rc.bottom - rc.top)) / 2,
|
rc.right - rc.left, // Calculate Adjusted Window Width
|
||||||
rc.right - rc.left,
|
rc.bottom - rc.top, // Calculate Adjusted Window Height
|
||||||
rc.bottom - rc.top,
|
NULL, // No Parent Window
|
||||||
NULL,
|
NULL, // No Menu
|
||||||
NULL,
|
hInstance, // Instance
|
||||||
hInstance,
|
NULL); // Don't Pass Anything To WM_CREATE
|
||||||
NULL);
|
|
||||||
|
|
||||||
if (GShwnd == NULL) return false;
|
if (GShwnd == NULL) return false;
|
||||||
|
|
||||||
|
@ -197,6 +196,7 @@ bool GLWindow::DisplayWindow(int _width, int _height)
|
||||||
dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
|
dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
|
||||||
dwStyle = WS_OVERLAPPEDWINDOW;
|
dwStyle = WS_OVERLAPPEDWINDOW;
|
||||||
}
|
}
|
||||||
|
dwStyle |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN;
|
||||||
|
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue