Re: [AD] Allegro 4.2.0 RC2 -- small const fix |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sun, 2005-08-28 at 12:32 +0200, Michal Molhanec wrote:
> typedef struct MOUSE_DRIVER
> {
> int id;
> AL_CONST char *name;
> AL_CONST char *desc;
> AL_CONST char *ascii_name;
> AL_METHOD(int, init, (void));
> AL_METHOD(void, exit, (void));
> AL_METHOD(void, poll, (void));
> AL_METHOD(void, timer_poll, (void));
> AL_METHOD(void, position, (int x, int y));
> AL_METHOD(void, set_range, (int x1, int y_1, int x2, int y2));
> AL_METHOD(void, set_speed, (int xspeed, int yspeed));
> AL_METHOD(void, get_mickeys, (int *mickeyx, int *mickeyy));
> AL_METHOD(int, analyse_data, (AL_CONST char *buffer, int size));
> AL_METHOD(void, enable_hardware_cursor, (AL_CONST int mode));
> AL_METHOD(int, select_system_cursor, (AL_CONST int cursor));
> } MOUSE_DRIVER;
>
> then it incorrect to assign to enable_hardware_cursor function without
> const parameter
>
Ah, yes, of course. Attached is a patch which removes the const from the
MOUSE_DRIVER. Would that fix the problem as well?
--
Elias Pschernig
Index: include/allegro/mouse.h
===================================================================
RCS file: /cvsroot/alleg/allegro/include/allegro/mouse.h,v
retrieving revision 1.7
diff -u -p -r1.7 mouse.h
--- include/allegro/mouse.h 29 Mar 2005 22:02:57 -0000 1.7
+++ include/allegro/mouse.h 28 Aug 2005 11:04:12 -0000
@@ -44,8 +44,8 @@ typedef struct MOUSE_DRIVER
AL_METHOD(void, set_speed, (int xspeed, int yspeed));
AL_METHOD(void, get_mickeys, (int *mickeyx, int *mickeyy));
AL_METHOD(int, analyse_data, (AL_CONST char *buffer, int size));
- AL_METHOD(void, enable_hardware_cursor, (AL_CONST int mode));
- AL_METHOD(int, select_system_cursor, (AL_CONST int cursor));
+ AL_METHOD(void, enable_hardware_cursor, (int mode));
+ AL_METHOD(int, select_system_cursor, (int cursor));
} MOUSE_DRIVER;
Index: src/win/wmouse.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/win/wmouse.c,v
retrieving revision 1.45
diff -u -p -r1.45 wmouse.c
--- src/win/wmouse.c 14 May 2005 15:54:52 -0000 1.45
+++ src/win/wmouse.c 28 Aug 2005 11:04:12 -0000
@@ -796,7 +796,7 @@ static void mouse_directx_enable_hardwar
/* mouse_directx_select_system_cursor:
* Select an OS native cursor
*/
-static int mouse_directx_select_system_cursor (AL_CONST int cursor)
+static int mouse_directx_select_system_cursor (int cursor)
{
HCURSOR wc;
HWND allegro_wnd = win_get_window();