testnativeos2.c: make its code style to match SDL2.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
diff --git a/test/testnativeos2.c b/test/testnativeos2.c
index 0fc5ebe..466c8be 100644
--- a/test/testnativeos2.c
+++ b/test/testnativeos2.c
@@ -14,46 +14,44 @@
#ifdef TEST_NATIVE_OS2
-#define WIN_CLIENT_CLASS "SDL Test"
+#define WIN_CLIENT_CLASS "SDL Test"
static void *CreateWindowNative(int w, int h);
static void DestroyWindowNative(void *window);
NativeWindowFactory OS2WindowFactory = {
- "DIVE",
- CreateWindowNative,
- DestroyWindowNative
+ "DIVE",
+ CreateWindowNative,
+ DestroyWindowNative
};
static void *CreateWindowNative(int w, int h)
{
- HWND hwnd;
- HWND hwndFrame;
- ULONG ulFrameFlags = FCF_TASKLIST | FCF_DLGBORDER | FCF_TITLEBAR |
- FCF_SYSMENU | FCF_SHELLPOSITION |
- FCF_SIZEBORDER | FCF_MINBUTTON | FCF_MAXBUTTON;
-
- WinRegisterClass( 0, WIN_CLIENT_CLASS, WinDefWindowProc,
- CS_SIZEREDRAW | CS_MOVENOTIFY,
- sizeof(ULONG) ); // We should have minimum 4 bytes.
-
- hwndFrame = WinCreateStdWindow( HWND_DESKTOP, 0, &ulFrameFlags,
- WIN_CLIENT_CLASS, "SDL Test", 0, 0, 1, &hwnd );
- if ( hwndFrame == NULLHANDLE )
- {
- return 0;
- }
-
- WinSetWindowPos( hwndFrame, HWND_TOP, 0, 0, w, h,
- SWP_ZORDER | SWP_ACTIVATE | SWP_SIZE | SWP_SHOW );
-
- return (void *)hwndFrame; // We may returns client or frame window handle
- // for SDL_CreateWindowFrom().
+ HWND hwnd, hwndFrame;
+ ULONG ulFrameFlags = FCF_TASKLIST | FCF_DLGBORDER | FCF_TITLEBAR |
+ FCF_SYSMENU | FCF_SHELLPOSITION |
+ FCF_SIZEBORDER | FCF_MINBUTTON | FCF_MAXBUTTON;
+
+ WinRegisterClass(0, WIN_CLIENT_CLASS, WinDefWindowProc,
+ CS_SIZEREDRAW | CS_MOVENOTIFY,
+ sizeof(ULONG)); /* We should have minimum 4 bytes. */
+
+ hwndFrame = WinCreateStdWindow(HWND_DESKTOP, 0, &ulFrameFlags,
+ WIN_CLIENT_CLASS, "SDL Test", 0, 0, 1, &hwnd);
+ if (hwndFrame == NULLHANDLE) {
+ return NULL;
+ }
+
+ WinSetWindowPos(hwndFrame, HWND_TOP, 0, 0, w, h,
+ SWP_ZORDER | SWP_ACTIVATE | SWP_SIZE | SWP_SHOW);
+
+ return (void *)hwndFrame; /* We may return client or frame window
+ handle for SDL_CreateWindowFrom(). */
}
static void DestroyWindowNative(void *window)
{
- WinDestroyWindow( (HWND)window );
+ WinDestroyWindow((HWND) window);
}
#endif /* TEST_NATIVE_OS2 */