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

Comparing Daodan/src/Daodan_Win32.c (file contents):
Revision 325 by rossy, Sun May 17 12:19:35 2009 UTC vs.
Revision 326 by rossy, Thu May 28 10:33:59 2009 UTC

# Line 3 | Line 3
3   #include "Daodan.h"
4   #include "Daodan_Win32.h"
5  
6 + #include "BFW_Utility.h"
7 +
8   #include "Oni.h"
9  
10   short ONICALL DDrPlatform_Initialize(ONtPlatformData *PlatformData)
# Line 14 | Line 16 | short ONICALL DDrPlatform_Initialize(ONt
16          PlatformData->Instance = g_Instance;
17  
18          WndClass.cbSize = sizeof(WndClass);
19 <        WndClass.style = WS_OVERLAPPED | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | CS_VREDRAW | CS_HREDRAW | CS_OWNDC;
19 >        WndClass.style = CS_VREDRAW | CS_HREDRAW | CS_OWNDC;
20          WndClass.cbClsExtra = 0;
21          WndClass.cbWndExtra = 0;
22          WndClass.hInstance = PlatformData->Instance;
# Line 32 | Line 34 | short ONICALL DDrPlatform_Initialize(ONt
34          Rect.top = (GetSystemMetrics(SM_CYSCREEN) / 2) - (Height / 2);
35          Rect.right = Rect.left + Width;
36          Rect.bottom = Rect.top + Height;
37 <        AdjustWindowRect(&Rect, WndClass.style, FALSE);
37 >        AdjustWindowRect(&Rect, WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_POPUP, FALSE);
38  
39 <        PlatformData->Window = CreateWindowEx(0, "ONI ", "ONI ", WS_POPUP, Rect.left, Rect.top, Rect.right - Rect.left, Rect.bottom - Rect.top, NULL, NULL, PlatformData->Instance, NULL);
39 >        PlatformData->Window = CreateWindowEx(0, "ONI ", "ONI ", WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_POPUP, Rect.left, Rect.top, Rect.right - Rect.left, Rect.bottom - Rect.top, NULL, NULL, PlatformData->Instance, NULL);
40          ShowWindow(PlatformData->Window, SW_SHOWNORMAL);
41          UpdateWindow(PlatformData->Window);
42  
43          ShowCursor(FALSE);
44 <
44 >        
45 >        // I dont know why this is needed but Oni doesn't init without it.
46 >        ONgPlatformData.Window = PlatformData->Window;
47 >        //ONgPlatformData.Instance = PlatformData->Instance;
48 >        
49          return 0;
50   }

Diff Legend

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