| 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) |
| 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; |
| 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 |
|
} |