ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/Daodan_WindowHack.c
(Generate patch)

Comparing Daodan/src/Daodan_WindowHack.c (file contents):
Revision 351 by rossy, Sat Jun 13 01:13:36 2009 UTC vs.
Revision 354 by rossy, Thu Jun 18 12:30:27 2009 UTC

# Line 8 | Line 8
8  
9   volatile HWND onihwnd, boxhwnd = NULL;
10   int inclient = 0;
11 + int dragging = 0;
12  
13   LRESULT CALLBACK DDrHack_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
14   {
# Line 41 | Line 42 | LRESULT CALLBACK DDrHack_WndProc(HWND hw
42                          PostQuitMessage(0);
43                          ExitProcess(0);
44                          break;
45 +                case WM_ENTERSIZEMOVE:
46 +                        dragging = 1;
47 +                        break;
48 +                case WM_EXITSIZEMOVE:
49 +                        dragging = 0;
50 +                        break;
51                  default:
52                          return DefWindowProc(hwnd, msg, wParam, lParam);
53          }
# Line 116 | Line 123 | BOOL WINAPI glpi_SetWindowPosHook(HWND h
123  
124   BOOL WINAPI LIiP_GetCursorPosHook(LPPOINT lpPoint)
125   {
126 <        if (GetAsyncKeyState(VK_F4))
126 >        if (GetAsyncKeyState(VK_F4) || dragging)
127          {
128                  lpPoint->x = gl->DisplayMode.Width / 2;
129                  lpPoint->y = gl->DisplayMode.Height / 2;
# Line 133 | Line 140 | BOOL WINAPI LIiP_GetCursorPosHook(LPPOIN
140  
141   BOOL WINAPI LIiP_SetCursorPosHook(int X, int Y)
142   {
143 <        if (GetAsyncKeyState(VK_F4))
143 >        if (GetAsyncKeyState(VK_F4) || dragging)
144                  return TRUE;
145          else
146          {

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)