Commit a0978cdf authored by Sam Lantinga's avatar Sam Lantinga

indent

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403537
parent 90b4c693
...@@ -12,10 +12,10 @@ NativeWindowFactory Win32WindowFactory = { ...@@ -12,10 +12,10 @@ NativeWindowFactory Win32WindowFactory = {
DestroyWindowWin32 DestroyWindowWin32
}; };
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK
WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
switch(msg) switch (msg) {
{
case WM_CLOSE: case WM_CLOSE:
DestroyWindow(hwnd); DestroyWindow(hwnd);
break; break;
...@@ -41,20 +41,21 @@ CreateWindowWin32(int w, int h) ...@@ -41,20 +41,21 @@ CreateWindowWin32(int w, int h)
wc.hInstance = GetModuleHandle(NULL); wc.hInstance = GetModuleHandle(NULL);
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.lpszClassName = "SDL Test"; wc.lpszClassName = "SDL Test";
if(!RegisterClass(&wc)) if (!RegisterClass(&wc)) {
{
MessageBox(NULL, "Window Registration Failed!", "Error!", MessageBox(NULL, "Window Registration Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK); MB_ICONEXCLAMATION | MB_OK);
return 0; return 0;
} }
hwnd = CreateWindow("SDL Test", "", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, w, h, NULL, NULL, GetModuleHandle(NULL), NULL); hwnd =
if(hwnd == NULL) CreateWindow("SDL Test", "", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT,
{ CW_USEDEFAULT, w, h, NULL, NULL, GetModuleHandle(NULL),
NULL);
if (hwnd == NULL) {
MessageBox(NULL, "Window Creation Failed!", "Error!", MessageBox(NULL, "Window Creation Failed!", "Error!",
MB_ICONEXCLAMATION | MB_OK); MB_ICONEXCLAMATION | MB_OK);
return 0; return 0;
...@@ -68,7 +69,7 @@ CreateWindowWin32(int w, int h) ...@@ -68,7 +69,7 @@ CreateWindowWin32(int w, int h)
static void static void
DestroyWindowWin32(void *window) DestroyWindowWin32(void *window)
{ {
DestroyWindow((HWND)window); DestroyWindow((HWND) window);
} }
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment