From: <tr...@us...> - 2010-03-30 17:04:24
|
Revision: 13154 http://alleg.svn.sourceforge.net/alleg/?rev=13154&view=rev Author: trentg Date: 2010-03-30 17:04:18 +0000 (Tue, 30 Mar 2010) Log Message: ----------- Don't call al_get_mouse_state if the mouse driver isn't installed (Windows) Modified Paths: -------------- allegro/branches/4.9/src/win/wnewwin.c Modified: allegro/branches/4.9/src/win/wnewwin.c =================================================================== --- allegro/branches/4.9/src/win/wnewwin.c 2010-03-30 17:03:31 UTC (rev 13153) +++ allegro/branches/4.9/src/win/wnewwin.c 2010-03-30 17:04:18 UTC (rev 13154) @@ -284,6 +284,9 @@ bool any_button_down = false; ALLEGRO_MOUSE_STATE state; + if (!al_is_mouse_installed()) + return; + al_get_mouse_state(&state); for (i = 1; i <= 5; i++) { any_button_down |= al_mouse_button_down(&state, i); @@ -494,7 +497,7 @@ _al_win_mouse_handle_leave(win_display); break; } - case WM_CAPTURECHANGED: { + case WM_CAPTURECHANGED: if (al_is_mouse_installed()) { int i; ALLEGRO_MOUSE_STATE state; if (!lParam || (HWND)lParam == hWnd) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |