diff --git a/engine/graphic/directx/dx11/gf_draw.c b/engine/graphic/directx/dx11/gf_draw.c index 6e3ee44..e1a1ab2 100644 --- a/engine/graphic/directx/dx11/gf_draw.c +++ b/engine/graphic/directx/dx11/gf_draw.c @@ -1,5 +1,6 @@ #define GF_EXPOSE_DRAW_PLATFORM #define GF_EXPOSE_DRAW +#define GF_EXPOSE_INPUT #include @@ -13,6 +14,7 @@ #include #include #include +#include /* Standard */ #include @@ -40,6 +42,12 @@ LRESULT CALLBACK gf_draw_platform_proc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp gf_draw_reshape(draw); } break; + case WM_MOUSEMOVE: + if(draw->input != NULL) { + draw->input->mouse_x = LOWORD(lp); + draw->input->mouse_y = HIWORD(lp); + } + break; case WM_CLOSE: draw->close = 1; break; diff --git a/engine/graphic/opengl/wgl/gf_draw.c b/engine/graphic/opengl/wgl/gf_draw.c index 450120a..8a54db4 100644 --- a/engine/graphic/opengl/wgl/gf_draw.c +++ b/engine/graphic/opengl/wgl/gf_draw.c @@ -1,5 +1,6 @@ #define GF_EXPOSE_DRAW_PLATFORM #define GF_EXPOSE_DRAW +#define GF_EXPOSE_INPUT #include @@ -13,6 +14,7 @@ #include #include #include +#include /* Standard */ #include @@ -46,6 +48,12 @@ LRESULT CALLBACK gf_draw_platform_proc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp gf_draw_reshape(draw); } break; + case WM_MOUSEMOVE: + if(draw->input != NULL) { + draw->input->mouse_x = LOWORD(lp); + draw->input->mouse_y = HIWORD(lp); + } + break; case WM_CLOSE: draw->close = 1; break;