diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2007-12-31 02:09:33 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2007-12-31 02:09:33 +0300 |
commit | 0f1e7db0b7ea39016313426b7259b1b35cd8ce47 (patch) | |
tree | a4ac744dfe9a67bba79d6912d3de887a1366244a /intern/ghost | |
parent | 1fec64a40219cdd3cf4a2248cb0b68efb83f33da (diff) |
* also distinguish between maximised and fullscreen on GHOST win32.
* clean up some warnings (unused vars).
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 2 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index fc8774f4298..ce1eaf32101 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -225,7 +225,7 @@ bool GHOST_SystemWin32::processEvents(bool waitForEvent) GHOST_TSuccess GHOST_SystemWin32::getCursorPosition(GHOST_TInt32& x, GHOST_TInt32& y) const { POINT point; - bool success = ::GetCursorPos(&point) == TRUE; + ::GetCursorPos(&point); x = point.x; y = point.y; return GHOST_kSuccess; diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 1931f5a6d5f..81a6c89a433 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -145,7 +145,7 @@ GHOST_WindowWin32::GHOST_WindowWin32( } if (m_hWnd) { // Store a pointer to this class in the window structure - LONG result = ::SetWindowLongPtr(m_hWnd, GWL_USERDATA, (LONG)this); + ::SetWindowLongPtr(m_hWnd, GWL_USERDATA, (LONG_PTR)this); // Store the device context m_hDC = ::GetDC(m_hWnd); @@ -373,7 +373,11 @@ GHOST_TWindowState GHOST_WindowWin32::getState() const state = GHOST_kWindowStateMinimized; } else if (::IsZoomed(m_hWnd)) { - state = GHOST_kWindowStateMaximized; + LONG_PTR result = ::GetWindowLongPtr(m_hWnd, GWL_STYLE); + if((result & (WS_POPUP | WS_MAXIMIZE)) != (WS_POPUP | WS_MAXIMIZE)) + state = GHOST_kWindowStateMaximized; + else + state = GHOST_kWindowStateFullScreen; } else { state = GHOST_kWindowStateNormal; @@ -622,7 +626,7 @@ void GHOST_WindowWin32::loadCursor(bool visible, GHOST_TStandardCursor cursor) c } if (success) { - HCURSOR hCursor = ::SetCursor(::LoadCursor(0, id)); + ::SetCursor(::LoadCursor(0, id)); } } } @@ -862,7 +866,7 @@ static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) { static int EnumPixelFormats(HDC hdc) { int iPixelFormat; int i, n, w, weight = 0; - PIXELFORMATDESCRIPTOR pfd, pfd_fallback; + PIXELFORMATDESCRIPTOR pfd; /* we need a device context to do anything */ if(!hdc) return 0; |