diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-11-11 11:32:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-11-11 11:32:29 +0300 |
commit | b2bb9ca39a687efc5dd1014e78650e39452d7cbf (patch) | |
tree | ff81299979056c20a9099a68f3b0254eb513cb29 /source/gameengine/BlenderRoutines/KX_BlenderGL.cpp | |
parent | 1dfc7942d3f35cbb8bb0e94fec57828da0eb756c (diff) |
Mitchell Stokes BGE MouseWarp patch + warning fix
[#19854] [bugfix] Fix for broken Rasterizer mouse functions
---
This patch fixes the embedded player's ability to control the mouse. For example, hiding and unhiding the mouse cursor
did not work in 2.5, nor could the mouse's position be controlled. This was because these parts still needed to be ported
to 2.5 window manager code.
Diffstat (limited to 'source/gameengine/BlenderRoutines/KX_BlenderGL.cpp')
-rw-r--r-- | source/gameengine/BlenderRoutines/KX_BlenderGL.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp index bb02f3b372e..b718dfc1acd 100644 --- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp +++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp @@ -73,11 +73,11 @@ extern "C" { #include "BKE_image.h" extern "C" { -//XXX #include "BDR_drawmesh.h" -//XXX #include "BIF_mywindow.h" -//XXX #include "BIF_toolbox.h" -//XXX #include "BIF_graphics.h" /* For CURSOR_NONE CURSOR_WAIT CURSOR_STD */ -void wm_window_swap_buffers(wmWindow *win); // wm_window.h +#include "WM_api.h" +#include "WM_types.h" +#include "wm_event_system.h" +#include "wm_cursors.h" +#include "wm_window.h" } /* end of blender block */ @@ -90,16 +90,14 @@ void spack(unsigned int ucol) glColor3ub(cp[3], cp[2], cp[1]); } -void BL_warp_pointer(int x,int y) +void BL_warp_pointer(wmWindow *win, int x,int y) { - //XXX warp_pointer(x,y); + WM_cursor_warp(win, x, y); } void BL_SwapBuffers(wmWindow *win) { - //wmWindow *window= CTX_wm_window(C); wm_window_swap_buffers(win); - //XXX myswapbuffers(); } void DisableForText() @@ -194,21 +192,21 @@ void BL_print_gamedebug_line_padded(const char* text, int xco, int yco, int widt glEnable(GL_DEPTH_TEST); } -void BL_HideMouse() +void BL_HideMouse(wmWindow *win) { - //XXX set_cursor(CURSOR_NONE); + WM_cursor_set(win, CURSOR_NONE); } -void BL_WaitMouse() +void BL_WaitMouse(wmWindow *win) { - //XXX set_cursor(CURSOR_WAIT); + WM_cursor_set(win, CURSOR_WAIT); } -void BL_NormalMouse() +void BL_NormalMouse(wmWindow *win) { - //XXX set_cursor(CURSOR_STD); + WM_cursor_set(win, CURSOR_STD); } #define MAX_FILE_LENGTH 512 |