Re: [AD] Allegro internal underscore breakage |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Saturday 22 January 2005 19:24, Evert Glebbeek wrote:
> I'll make a patch for this in a little while and check for other such
> `broken' functions.
Patch attached. This is by no means complete, nor well tested. I'm not in a
hurry to get this through though, it can wait for 4.2 RC1...
Evert
Index: wddovl.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/win/wddovl.c,v
retrieving revision 1.45
diff -u -r1.45 wddovl.c
--- wddovl.c 21 Jan 2005 10:37:04 -0000 1.45
+++ wddovl.c 22 Jan 2005 18:41:03 -0000
@@ -315,7 +315,7 @@
overlay_brush = CreateSolidBrush(MASK_COLOR_32);
SetClassLong(allegro_wnd, GCL_HBRBACKGROUND, (LONG) overlay_brush);
- if (adjust_window(w, h) != 0) {
+ if (_win_adjust_window(w, h) != 0) {
_TRACE("window size not supported.\n");
ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Resolution not supported"));
goto Error;
@@ -423,7 +423,7 @@
_enter_gfx_critical();
if (bmp) {
- save_window_pos();
+ _win_save_window_pos();
clear_bitmap(bmp);
}
Index: wddraw.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/win/wddraw.c,v
retrieving revision 1.34
diff -u -r1.34 wddraw.c
--- wddraw.c 4 Dec 2004 13:24:17 -0000 1.34
+++ wddraw.c 22 Jan 2005 18:41:03 -0000
@@ -350,7 +350,7 @@
/* before restoring video mode, hide window */
set_display_switch_mode(SWITCH_PAUSE);
system_driver->restore_console_state();
- restore_window_style();
+ _win_restore_window_style();
/* let the window thread set the coop level back
* to normal and destroy the directdraw object
Index: wddwin.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/win/wddwin.c,v
retrieving revision 1.73
diff -u -r1.73 wddwin.c
--- wddwin.c 19 Jan 2005 22:43:45 -0000 1.73
+++ wddwin.c 22 Jan 2005 18:41:04 -0000
@@ -676,7 +676,7 @@
if (finalize_directx_init() != 0)
goto Error;
- if (adjust_window(w, h) != 0) {
+ if (_win_adjust_window(w, h) != 0) {
_TRACE("window size not supported.\n");
ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Resolution not supported"));
goto Error;
@@ -789,7 +789,7 @@
_enter_gfx_critical();
if (bmp) {
- save_window_pos();
+ _win_save_window_pos();
clear_bitmap(bmp);
}
Index: wgdi.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/win/wgdi.c,v
retrieving revision 1.34
diff -u -r1.34 wgdi.c
--- wgdi.c 16 Oct 2004 19:45:33 -0000 1.34
+++ wgdi.c 22 Jan 2005 18:41:04 -0000
@@ -456,7 +456,7 @@
gfx_gdi.w = w;
gfx_gdi.h = h;
- if (adjust_window(w, h) != 0) {
+ if (_win_adjust_window(w, h) != 0) {
_TRACE("window size not supported.\n");
ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Resolution not supported"));
goto Error;
@@ -510,7 +510,7 @@
_enter_gfx_critical();
if (bmp) {
- save_window_pos();
+ _win_save_window_pos();
clear_bitmap(bmp);
}
@@ -546,7 +546,7 @@
/* before restoring video mode, hide window */
set_display_switch_mode(SWITCH_PAUSE);
system_driver->restore_console_state();
- restore_window_style();
+ _win_restore_window_style();
_exit_critical();
}
Index: wmouse.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/win/wmouse.c,v
retrieving revision 1.43
diff -u -r1.43 wmouse.c
--- wmouse.c 21 Jan 2005 08:33:01 -0000 1.43
+++ wmouse.c 22 Jan 2005 18:41:05 -0000
@@ -145,13 +145,13 @@
(p.y < mouse_miny) || (p.y > mouse_maxy)) { \
if (_mouse_on) { \
_mouse_on = FALSE; \
- wnd_schedule_proc(mouse_set_syscursor); \
+ wnd_schedule_proc(_mouse_set_syscursor); \
} \
} \
else { \
if (!_mouse_on) { \
_mouse_on = TRUE; \
- wnd_schedule_proc(mouse_set_syscursor); \
+ wnd_schedule_proc(_mouse_set_syscursor); \
} \
_mouse_x = p.x; \
_mouse_y = p.y; \
@@ -375,7 +375,7 @@
if (!_mouse_on) {
_mouse_on = TRUE;
- wnd_schedule_proc(mouse_set_syscursor);
+ wnd_schedule_proc(_win_mouse_set_syscursor);
}
_handle_mouse_input();
@@ -466,13 +466,13 @@
mouse_dinput_acquire();
/* update the system cursor */
- mouse_set_syscursor();
+ _win_mouse_set_syscursor();
return 0;
}
else {
/* update the system cursor */
- mouse_set_syscursor();
+ _win_mouse_set_syscursor();
return -1;
}
@@ -480,10 +480,10 @@
-/* mouse_set_syscursor: [window thread]
+/* _win_mouse_set_syscursor: [window thread]
* Selects whatever system cursor we should display.
*/
-int mouse_set_syscursor(void)
+int _win_mouse_set_syscursor(void)
{
if ((mouse_dinput_device && _mouse_on) || (gfx_driver && !gfx_driver->windowed)) {
SetCursor(_win_hcursor);
@@ -509,7 +509,7 @@
if (state == TRUE) {
if (_mouse_on) {
_mouse_on = FALSE;
- mouse_set_syscursor();
+ _win_mouse_set_syscursor();
}
}
else {
@@ -554,7 +554,7 @@
}
/* update the system cursor */
- wnd_schedule_proc(mouse_set_syscursor);
+ wnd_schedule_proc(_win_mouse_set_syscursor);
return 0;
}
Index: wwnd.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/win/wwnd.c,v
retrieving revision 1.81
diff -u -r1.81 wwnd.c
--- wwnd.c 27 Sep 2004 22:47:56 -0000 1.81
+++ wwnd.c 22 Jan 2005 18:41:05 -0000
@@ -225,7 +225,7 @@
case WM_SETCURSOR:
if (!user_wnd_proc || _mouse_installed) {
- mouse_set_syscursor();
+ _win_mouse_set_syscursor();
return 1; /* not TRUE */
}
break;
@@ -563,10 +563,10 @@
-/* restore_window_style:
+/* _win_restore_window_style:
* Restores the previous style of the window.
*/
-void restore_window_style(void)
+void _win_restore_window_style(void)
{
SetWindowLong(allegro_wnd, GWL_STYLE, old_style);
SetWindowPos(allegro_wnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED);
@@ -574,10 +574,10 @@
-/* adjust_window:
+/* _win_adjust_window:
* Moves and resizes the window if we have full control over it.
*/
-int adjust_window(int w, int h)
+int _win_adjust_window(int w, int h)
{
RECT working_area, win_size;
@@ -621,11 +621,11 @@
-/* save_window_pos:
+/* _win_save_window_pos:
* Stores the position of the current window before closing it so that
* it can be used as the initial position for the next window.
*/
-void save_window_pos(void)
+void _win_save_window_pos(void)
{
last_wnd_x = wnd_x;
last_wnd_y = wnd_y;