Rémi Bernon : winex11.drv: Constify set_current_mode DEVMODEW parameter.
Alexandre Julliard
julliard at winehq.org
Tue Aug 2 14:54:40 CDT 2022
Module: wine
Branch: master
Commit: d7457fd32e17cbadbccee2faf2c0738765389094
URL: https://gitlab.winehq.org/wine/wine/-/commit/d7457fd32e17cbadbccee2faf2c0738765389094
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Fri Jul 29 14:02:42 2022 +0200
winex11.drv: Constify set_current_mode DEVMODEW parameter.
---
dlls/winex11.drv/desktop.c | 2 +-
dlls/winex11.drv/display.c | 2 +-
dlls/winex11.drv/x11drv.h | 2 +-
dlls/winex11.drv/xrandr.c | 4 ++--
dlls/winex11.drv/xvidmode.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c
index 3e589f9d940..84457582a7c 100644
--- a/dlls/winex11.drv/desktop.c
+++ b/dlls/winex11.drv/desktop.c
@@ -218,7 +218,7 @@ static BOOL X11DRV_desktop_get_current_mode( ULONG_PTR id, DEVMODEW *mode )
return TRUE;
}
-static LONG X11DRV_desktop_set_current_mode( ULONG_PTR id, DEVMODEW *mode )
+static LONG X11DRV_desktop_set_current_mode( ULONG_PTR id, const DEVMODEW *mode )
{
if (mode->dmFields & DM_BITSPERPEL && mode->dmBitsPerPel != screen_bpp)
WARN("Cannot change screen color depth from %dbits to %dbits!\n", screen_bpp, mode->dmBitsPerPel);
diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c
index ef379e1ea9f..0af9ceeac08 100644
--- a/dlls/winex11.drv/display.c
+++ b/dlls/winex11.drv/display.c
@@ -144,7 +144,7 @@ static BOOL nores_get_current_mode(ULONG_PTR id, DEVMODEW *mode)
return TRUE;
}
-static LONG nores_set_current_mode(ULONG_PTR id, DEVMODEW *mode)
+static LONG nores_set_current_mode(ULONG_PTR id, const DEVMODEW *mode)
{
WARN("NoRes settings handler, ignoring mode change request.\n");
return DISP_CHANGE_SUCCESSFUL;
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 0fe29d8e322..b8997455324 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -741,7 +741,7 @@ struct x11drv_settings_handler
* mode must be a valid mode from get_modes() with optional fields, such as dmPosition set.
*
* Return DISP_CHANGE_*, same as ChangeDisplaySettingsExW() return values */
- LONG (*set_current_mode)(ULONG_PTR id, DEVMODEW *mode);
+ LONG (*set_current_mode)(ULONG_PTR id, const DEVMODEW *mode);
};
extern void X11DRV_Settings_SetHandler(const struct x11drv_settings_handler *handler) DECLSPEC_HIDDEN;
diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c
index d3b96e3170b..5b81fb07709 100644
--- a/dlls/winex11.drv/xrandr.c
+++ b/dlls/winex11.drv/xrandr.c
@@ -282,7 +282,7 @@ static BOOL xrandr10_get_current_mode( ULONG_PTR id, DEVMODEW *mode )
return TRUE;
}
-static LONG xrandr10_set_current_mode( ULONG_PTR id, DEVMODEW *mode )
+static LONG xrandr10_set_current_mode( ULONG_PTR id, const DEVMODEW *mode )
{
XRRScreenConfiguration *screen_config;
Rotation rotation;
@@ -1544,7 +1544,7 @@ done:
return ret;
}
-static LONG xrandr14_set_current_mode( ULONG_PTR id, DEVMODEW *mode )
+static LONG xrandr14_set_current_mode( ULONG_PTR id, const DEVMODEW *mode )
{
unsigned int screen_width, screen_height;
RROutput output = (RROutput)id, *outputs;
diff --git a/dlls/winex11.drv/xvidmode.c b/dlls/winex11.drv/xvidmode.c
index 4ca7bc1ac59..27831cabd3b 100644
--- a/dlls/winex11.drv/xvidmode.c
+++ b/dlls/winex11.drv/xvidmode.c
@@ -215,7 +215,7 @@ static BOOL xf86vm_get_current_mode(ULONG_PTR id, DEVMODEW *mode)
return TRUE;
}
-static LONG xf86vm_set_current_mode(ULONG_PTR id, DEVMODEW *mode)
+static LONG xf86vm_set_current_mode(ULONG_PTR id, const DEVMODEW *mode)
{
XF86VidModeModeInfo *xf86vm_mode;
Bool ret;
More information about the wine-cvs
mailing list