Commit 6aeaeed9 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Add primary adapter name parameter to ChangeDisplaySettings.

parent 0f1d8329
......@@ -753,7 +753,7 @@ static void nulldrv_UpdateClipboard(void)
{
}
static LONG nulldrv_ChangeDisplaySettings( LPDEVMODEW displays, HWND hwnd,
static LONG nulldrv_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd,
DWORD flags, LPVOID lparam )
{
return DISP_CHANGE_FAILED;
......@@ -1066,10 +1066,10 @@ static SHORT loaderdrv_VkKeyScanEx( WCHAR ch, HKL layout )
return load_driver()->pVkKeyScanEx( ch, layout );
}
static LONG loaderdrv_ChangeDisplaySettings( LPDEVMODEW displays, HWND hwnd,
static LONG loaderdrv_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd,
DWORD flags, LPVOID lparam )
{
return load_driver()->pChangeDisplaySettings( displays, hwnd, flags, lparam );
return load_driver()->pChangeDisplaySettings( displays, primary_name, hwnd, flags, lparam );
}
static BOOL loaderdrv_GetCurrentDisplaySettings( LPCWSTR name, LPDEVMODEW mode )
......
......@@ -2422,6 +2422,7 @@ static BOOL all_detached_settings( const DEVMODEW *displays )
static LONG apply_display_settings( const WCHAR *devname, const DEVMODEW *devmode,
HWND hwnd, DWORD flags, void *lparam )
{
WCHAR primary_name[CCHDEVICENAME];
struct adapter *adapter;
DEVMODEW *displays;
LONG ret;
......@@ -2438,7 +2439,14 @@ static LONG apply_display_settings( const WCHAR *devname, const DEVMODEW *devmod
place_all_displays( displays );
ret = user_driver->pChangeDisplaySettings( displays, hwnd, flags, lparam );
if (!(adapter = find_adapter( NULL ))) primary_name[0] = 0;
else
{
wcscpy( primary_name, adapter->dev.device_name );
adapter_release( adapter );
}
ret = user_driver->pChangeDisplaySettings( displays, primary_name, hwnd, flags, lparam );
free( displays );
if (ret) return ret;
......
......@@ -262,9 +262,9 @@ static BOOL CDECL ANDROID_DeleteDC( PHYSDEV dev )
/***********************************************************************
* ANDROID_ChangeDisplaySettings
*/
LONG ANDROID_ChangeDisplaySettings( LPDEVMODEW displays, HWND hwnd, DWORD flags, LPVOID lpvoid )
LONG ANDROID_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid )
{
FIXME( "(%p,%p,0x%08x,%p)\n", displays, hwnd, flags, lpvoid );
FIXME( "(%p,%s,%p,0x%08x,%p)\n", displays, debugstr_w(primary_name), hwnd, flags, lpvoid );
return DISP_CHANGE_SUCCESSFUL;
}
......
......@@ -769,7 +769,7 @@ static CGDisplayModeRef find_best_display_mode(DEVMODEW *devmode, CFArrayRef dis
* ChangeDisplaySettings (MACDRV.@)
*
*/
LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, HWND hwnd, DWORD flags, LPVOID lpvoid)
LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid)
{
WCHAR primary_adapter[CCHDEVICENAME];
LONG ret = DISP_CHANGE_SUCCESSFUL;
......@@ -781,7 +781,7 @@ LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, HWND hwnd, DWORD flags, L
struct display_mode_descriptor *desc;
CGDisplayModeRef best_display_mode;
TRACE("%p %p 0x%08x %p\n", displays, hwnd, flags, lpvoid);
TRACE("%p %s %p 0x%08x %p\n", displays, debugstr_w(primary_name), hwnd, flags, lpvoid);
init_original_display_mode();
......
......@@ -122,7 +122,7 @@ static inline struct macdrv_thread_data *macdrv_thread_data(void)
extern BOOL macdrv_ActivateKeyboardLayout(HKL hkl, UINT flags) DECLSPEC_HIDDEN;
extern void macdrv_Beep(void) DECLSPEC_HIDDEN;
extern LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, HWND hwnd, DWORD flags, LPVOID lpvoid) DECLSPEC_HIDDEN;
extern LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid) DECLSPEC_HIDDEN;
extern BOOL macdrv_GetCurrentDisplaySettings(LPCWSTR name, LPDEVMODEW devmode) DECLSPEC_HIDDEN;
extern LRESULT macdrv_ClipboardWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) DECLSPEC_HIDDEN;
extern BOOL macdrv_UpdateDisplayDevices( const struct gdi_device_manager *device_manager,
......
......@@ -390,7 +390,7 @@ static LONG apply_display_settings( DEVMODEW *displays, ULONG_PTR *ids, BOOL do_
* ChangeDisplaySettings (X11DRV.@)
*
*/
LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, HWND hwnd, DWORD flags, LPVOID lpvoid )
LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid )
{
INT left_most = INT_MAX, top_most = INT_MAX;
LONG count, ret = DISP_CHANGE_BADPARAM;
......
......@@ -213,7 +213,7 @@ extern void X11DRV_SetCursor( HCURSOR handle ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_SetCursorPos( INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_GetCursorPos( LPPOINT pos ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_ClipCursor( LPCRECT clip ) DECLSPEC_HIDDEN;
extern LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, HWND hwnd, DWORD flags, LPVOID lpvoid ) DECLSPEC_HIDDEN;
extern LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_GetCurrentDisplaySettings( LPCWSTR name, LPDEVMODEW devmode ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manager,
BOOL force, void *param ) DECLSPEC_HIDDEN;
......
......@@ -297,7 +297,7 @@ struct user_driver_funcs
LRESULT (*pClipboardWindowProc)(HWND,UINT,WPARAM,LPARAM);
void (*pUpdateClipboard)(void);
/* display modes */
LONG (*pChangeDisplaySettings)(LPDEVMODEW,HWND,DWORD,LPVOID);
LONG (*pChangeDisplaySettings)(LPDEVMODEW,LPCWSTR,HWND,DWORD,LPVOID);
BOOL (*pGetCurrentDisplaySettings)(LPCWSTR,LPDEVMODEW);
BOOL (*pUpdateDisplayDevices)(const struct gdi_device_manager *,BOOL,void*);
/* windowing functions */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment