bugfix
parent
df2992f2b7
commit
4bf6f3728c
|
@ -40,7 +40,9 @@
|
|||
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
typedef BOOL (APIENTRY * wglChoosePixelFormatARBProc) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
|
||||
typedef BOOL (APIENTRY * wglChoosePixelFormatARBProc) (HDC hdc, const int *piAttribIList,
|
||||
const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
|
||||
MTS_NAMESPACE_BEGIN
|
||||
|
@ -67,7 +69,7 @@ LONG WINAPI WGLDevice::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara
|
|||
break;
|
||||
case WM_SIZE: {
|
||||
Vector2i size = Vector2i(LOWORD(lParam), HIWORD(lParam));
|
||||
if (device->m_size == size) {
|
||||
if (device->m_size != size) {
|
||||
device->m_size = size;
|
||||
deviceEvent.setType(EResizeEvent);
|
||||
device->fireDeviceEvent(deviceEvent);
|
||||
|
@ -280,10 +282,14 @@ void WGLDevice::init(Device *other) {
|
|||
(windows is soo bugged!), the second pass creates the actual
|
||||
window with the matching pixel format
|
||||
*/
|
||||
int extra = 0;
|
||||
if (m_resizeAllowed)
|
||||
extra = WS_SIZEBOX | WS_MAXIMIZEBOX;
|
||||
|
||||
m_hwnd = CreateWindow(
|
||||
session->m_wndClassName.c_str(),
|
||||
m_title.c_str(),
|
||||
m_fullscreen ? WS_POPUP : (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_SIZEBOX),
|
||||
m_fullscreen ? WS_POPUP : (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | extra),
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
getSize().x, getSize().y,
|
||||
|
|
Loading…
Reference in New Issue