This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository direct3d.
View the commit online.
commit ff32c00bef4b486d9ce298bb0f16a80a974db8a1
Author: Vincent Torri <[email protected]>
AuthorDate: Sun Jul 31 16:30:15 2022 +0200
fix indentation
---
src/win.c | 156 +++++++++++++++++++++++++++++++-------------------------------
1 file changed, 78 insertions(+), 78 deletions(-)
diff --git a/src/win.c b/src/win.c
index f1c0ae5..8e5c60f 100644
--- a/src/win.c
+++ b/src/win.c
@@ -21,40 +21,40 @@ _window_procedure(HWND window,
WPARAM window_param,
LPARAM data_param)
{
- switch (message)
+ switch (message)
{
- case WM_CLOSE:
- PostQuitMessage(0);
- return 0;
- case WM_KEYUP:
- if (window_param == 'Q')
- {
+ case WM_CLOSE:
PostQuitMessage(0);
- }
- if (window_param == 'F')
- {
- Window *win;
+ return 0;
+ case WM_KEYUP:
+ if (window_param == 'Q')
+ {
+ PostQuitMessage(0);
+ }
+ if (window_param == 'F')
+ {
+ Window *win;
#ifdef _DEBUG
- printf("fullscreen\n");
- fflush(stdout);
+ printf("fullscreen\n");
+ fflush(stdout);
#endif
- win = (Window *)GetWindowLongPtr(window, GWLP_USERDATA);
- window_fullscreen_set(win, !win->fullscreen);
- }
- if (window_param == 'R')
- {
- Window *win;
+ win = (Window *)GetWindowLongPtr(window, GWLP_USERDATA);
+ window_fullscreen_set(win, !win->fullscreen);
+ }
+ if (window_param == 'R')
+ {
+ Window *win;
#ifdef _DEBUG
- printf("rotation\n");
- fflush(stdout);
+ printf("rotation\n");
+ fflush(stdout);
#endif
- win = (Window *)GetWindowLongPtr(window, GWLP_USERDATA);
- window_rotation_set(win, (win->rotation + 1) % 4);
- }
- if (window_param == 'D')
- {
+ win = (Window *)GetWindowLongPtr(window, GWLP_USERDATA);
+ window_rotation_set(win, (win->rotation + 1) % 4);
+ }
+ if (window_param == 'D')
+ {
/* RECT r; */
/* Window* win; */
@@ -63,74 +63,74 @@ _window_procedure(HWND window,
/* fflush(stdout); */
/* #endif */
/* win = (Window*)GetWindowLongPtr(window, GWLP_USERDATA); */
- }
- if (window_param == 'U')
- {
- RECT r;
- Window* win;
+ }
+ if (window_param == 'U')
+ {
+ RECT r;
+ Window* win;
#ifdef _DEBUG
- printf("update d3d\n");
- fflush(stdout);
+ printf("update d3d\n");
+ fflush(stdout);
#endif
- win = (Window*)GetWindowLongPtr(window, GWLP_USERDATA);
- GetClientRect(window, &r);
- d3d_resize(win->d3d,
- win->rotation,
- r.right - r.left, r.bottom - r.top);
- d3d_render(win->d3d);
- }
- return 0;
- case WM_ERASEBKGND:
- /* no need to erase back */
- return 1;
- /* GDI notifications */
- case WM_CREATE:
+ win = (Window*)GetWindowLongPtr(window, GWLP_USERDATA);
+ GetClientRect(window, &r);
+ d3d_resize(win->d3d,
+ win->rotation,
+ r.right - r.left, r.bottom - r.top);
+ d3d_render(win->d3d);
+ }
+ return 0;
+ case WM_ERASEBKGND:
+ /* no need to erase back */
+ return 1;
+ /* GDI notifications */
+ case WM_CREATE:
#ifdef _DEBUG
- printf(" * WM_CREATE\n");
- fflush(stdout);
+ printf(" * WM_CREATE\n");
+ fflush(stdout);
#endif
- return 0;
- case WM_SIZE:
- {
- Window * win;
+ return 0;
+ case WM_SIZE:
+ {
+ Window * win;
#ifdef _DEBUG
- printf(" * WM_SIZE : %u %u\n", (UINT)LOWORD(data_param), (UINT)HIWORD(data_param));
- fflush(stdout);
+ printf(" * WM_SIZE : %u %u\n", (UINT)LOWORD(data_param), (UINT)HIWORD(data_param));
+ fflush(stdout);
#endif
- win = (Window *)GetWindowLongPtr(window, GWLP_USERDATA);
- d3d_resize(win->d3d,
- win->rotation,
- (UINT)LOWORD(data_param), (UINT)HIWORD(data_param));
+ win = (Window *)GetWindowLongPtr(window, GWLP_USERDATA);
+ d3d_resize(win->d3d,
+ win->rotation,
+ (UINT)LOWORD(data_param), (UINT)HIWORD(data_param));
- return 0;
- }
- case WM_PAINT:
- {
+ return 0;
+ }
+ case WM_PAINT:
+ {
#ifdef _DEBUG
- printf(" * WM_PAINT\n");
- fflush(stdout);
+ printf(" * WM_PAINT\n");
+ fflush(stdout);
#endif
- if (GetUpdateRect(window, NULL, FALSE))
- {
- PAINTSTRUCT ps;
- Window *win;
+ if (GetUpdateRect(window, NULL, FALSE))
+ {
+ PAINTSTRUCT ps;
+ Window *win;
- BeginPaint(window, &ps);
+ BeginPaint(window, &ps);
- win = (Window *)GetWindowLongPtr(window, GWLP_USERDATA);
- d3d_render(win->d3d);
+ win = (Window *)GetWindowLongPtr(window, GWLP_USERDATA);
+ d3d_render(win->d3d);
- EndPaint(window, &ps);
- }
+ EndPaint(window, &ps);
+ }
- return 0;
- }
- default:
- return DefWindowProc(window, message, window_param, data_param);
+ return 0;
+ }
+ default:
+ return DefWindowProc(window, message, window_param, data_param);
}
}
@@ -397,7 +397,7 @@ int main()
do
{
if (msg.message == WM_QUIT)
- goto beach;
+ goto beach;
TranslateMessage(&msg);
DispatchMessageW(&msg);
} while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.