forked from Mirrors/wine-wine
winex11.drv: Use underscore style for struct x11drv_display_device_handler.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>stable
parent
6dbb153ede
commit
de94cfa775
|
@ -470,7 +470,7 @@ void X11DRV_DisplayDevices_Init(BOOL force)
|
||||||
monitor_devinfo = SetupDiCreateDeviceInfoList(&GUID_DEVCLASS_MONITOR, NULL);
|
monitor_devinfo = SetupDiCreateDeviceInfoList(&GUID_DEVCLASS_MONITOR, NULL);
|
||||||
|
|
||||||
/* Initialize GPUs */
|
/* Initialize GPUs */
|
||||||
if (!handler.pGetGpus(&gpus, &gpu_count))
|
if (!handler.get_gpus(&gpus, &gpu_count))
|
||||||
goto done;
|
goto done;
|
||||||
TRACE("GPU count: %d\n", gpu_count);
|
TRACE("GPU count: %d\n", gpu_count);
|
||||||
|
|
||||||
|
@ -480,13 +480,13 @@ void X11DRV_DisplayDevices_Init(BOOL force)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
/* Initialize adapters */
|
/* Initialize adapters */
|
||||||
if (!handler.pGetAdapters(gpus[gpu].id, &adapters, &adapter_count))
|
if (!handler.get_adapters(gpus[gpu].id, &adapters, &adapter_count))
|
||||||
goto done;
|
goto done;
|
||||||
TRACE("GPU: %#lx %s, adapter count: %d\n", gpus[gpu].id, wine_dbgstr_w(gpus[gpu].name), adapter_count);
|
TRACE("GPU: %#lx %s, adapter count: %d\n", gpus[gpu].id, wine_dbgstr_w(gpus[gpu].name), adapter_count);
|
||||||
|
|
||||||
for (adapter = 0; adapter < adapter_count; adapter++)
|
for (adapter = 0; adapter < adapter_count; adapter++)
|
||||||
{
|
{
|
||||||
if (!handler.pGetMonitors(adapters[adapter].id, &monitors, &monitor_count))
|
if (!handler.get_monitors(adapters[adapter].id, &monitors, &monitor_count))
|
||||||
goto done;
|
goto done;
|
||||||
TRACE("adapter: %#lx, monitor count: %d\n", adapters[adapter].id, monitor_count);
|
TRACE("adapter: %#lx, monitor count: %d\n", adapters[adapter].id, monitor_count);
|
||||||
|
|
||||||
|
@ -502,12 +502,12 @@ void X11DRV_DisplayDevices_Init(BOOL force)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
handler.pFreeMonitors(monitors);
|
handler.free_monitors(monitors);
|
||||||
monitors = NULL;
|
monitors = NULL;
|
||||||
video_index++;
|
video_index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
handler.pFreeAdapters(adapters);
|
handler.free_adapters(adapters);
|
||||||
adapters = NULL;
|
adapters = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -522,9 +522,9 @@ done:
|
||||||
ReleaseMutex(mutex);
|
ReleaseMutex(mutex);
|
||||||
CloseHandle(mutex);
|
CloseHandle(mutex);
|
||||||
if (gpus)
|
if (gpus)
|
||||||
handler.pFreeGpus(gpus);
|
handler.free_gpus(gpus);
|
||||||
if (adapters)
|
if (adapters)
|
||||||
handler.pFreeAdapters(adapters);
|
handler.free_adapters(adapters);
|
||||||
if (monitors)
|
if (monitors)
|
||||||
handler.pFreeMonitors(monitors);
|
handler.free_monitors(monitors);
|
||||||
}
|
}
|
||||||
|
|
|
@ -715,34 +715,34 @@ struct x11drv_display_device_handler
|
||||||
/* A name to tell what host driver is used */
|
/* A name to tell what host driver is used */
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
/* Higher priority can override handlers with lower proprity */
|
/* Higher priority can override handlers with lower priority */
|
||||||
INT priority;
|
INT priority;
|
||||||
|
|
||||||
/* pGetGpus will be called to get a list of GPUs. First GPU has to be where the primary adapter is.
|
/* get_gpus will be called to get a list of GPUs. First GPU has to be where the primary adapter is.
|
||||||
*
|
*
|
||||||
* Return FALSE on failure with parameters unchanged */
|
* Return FALSE on failure with parameters unchanged */
|
||||||
BOOL (*pGetGpus)(struct x11drv_gpu **gpus, int *count);
|
BOOL (*get_gpus)(struct x11drv_gpu **gpus, int *count);
|
||||||
|
|
||||||
/* pGetAdapters will be called to get a list of adapters in EnumDisplayDevices context under a GPU.
|
/* get_adapters will be called to get a list of adapters in EnumDisplayDevices context under a GPU.
|
||||||
* The first adapter has to be primary if GPU is primary.
|
* The first adapter has to be primary if GPU is primary.
|
||||||
*
|
*
|
||||||
* Return FALSE on failure with parameters unchanged */
|
* Return FALSE on failure with parameters unchanged */
|
||||||
BOOL (*pGetAdapters)(ULONG_PTR gpu_id, struct x11drv_adapter **adapters, int *count);
|
BOOL (*get_adapters)(ULONG_PTR gpu_id, struct x11drv_adapter **adapters, int *count);
|
||||||
|
|
||||||
/* pGetMonitors will be called to get a list of monitors in EnumDisplayDevices context under an adapter.
|
/* get_monitors will be called to get a list of monitors in EnumDisplayDevices context under an adapter.
|
||||||
* The first monitor has to be primary if adapter is primary.
|
* The first monitor has to be primary if adapter is primary.
|
||||||
*
|
*
|
||||||
* Return FALSE on failure with parameters unchanged */
|
* Return FALSE on failure with parameters unchanged */
|
||||||
BOOL (*pGetMonitors)(ULONG_PTR adapter_id, struct x11drv_monitor **monitors, int *count);
|
BOOL (*get_monitors)(ULONG_PTR adapter_id, struct x11drv_monitor **monitors, int *count);
|
||||||
|
|
||||||
/* pFreeGpus will be called to free a GPU list from pGetGpus */
|
/* free_gpus will be called to free a GPU list from get_gpus */
|
||||||
void (*pFreeGpus)(struct x11drv_gpu *gpus);
|
void (*free_gpus)(struct x11drv_gpu *gpus);
|
||||||
|
|
||||||
/* pFreeAdapters will be called to free an adapter list from pGetAdapters */
|
/* free_adapters will be called to free an adapter list from get_adapters */
|
||||||
void (*pFreeAdapters)(struct x11drv_adapter *adapters);
|
void (*free_adapters)(struct x11drv_adapter *adapters);
|
||||||
|
|
||||||
/* pFreeMonitors will be called to free a monitor list from pGetMonitors */
|
/* free_monitors will be called to free a monitor list from get_monitors */
|
||||||
void (*pFreeMonitors)(struct x11drv_monitor *monitors);
|
void (*free_monitors)(struct x11drv_monitor *monitors);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void X11DRV_DisplayDevices_SetHandler(const struct x11drv_display_device_handler *handler) DECLSPEC_HIDDEN;
|
extern void X11DRV_DisplayDevices_SetHandler(const struct x11drv_display_device_handler *handler) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -338,11 +338,11 @@ void xinerama_init( unsigned int width, unsigned int height )
|
||||||
|
|
||||||
handler.name = desktop_mode ? "Desktop" : "Xinerama";
|
handler.name = desktop_mode ? "Desktop" : "Xinerama";
|
||||||
handler.priority = desktop_mode ? 1000 : 100;
|
handler.priority = desktop_mode ? 1000 : 100;
|
||||||
handler.pGetGpus = xinerama_get_gpus;
|
handler.get_gpus = xinerama_get_gpus;
|
||||||
handler.pGetAdapters = xinerama_get_adapters;
|
handler.get_adapters = xinerama_get_adapters;
|
||||||
handler.pGetMonitors = xinerama_get_monitors;
|
handler.get_monitors = xinerama_get_monitors;
|
||||||
handler.pFreeGpus = xinerama_free_gpus;
|
handler.free_gpus = xinerama_free_gpus;
|
||||||
handler.pFreeAdapters = xinerama_free_adapters;
|
handler.free_adapters = xinerama_free_adapters;
|
||||||
handler.pFreeMonitors = xinerama_free_monitors;
|
handler.free_monitors = xinerama_free_monitors;
|
||||||
X11DRV_DisplayDevices_SetHandler( &handler );
|
X11DRV_DisplayDevices_SetHandler( &handler );
|
||||||
}
|
}
|
||||||
|
|
|
@ -1109,12 +1109,12 @@ void X11DRV_XRandR_Init(void)
|
||||||
{
|
{
|
||||||
handler.name = "XRandR 1.4";
|
handler.name = "XRandR 1.4";
|
||||||
handler.priority = 200;
|
handler.priority = 200;
|
||||||
handler.pGetGpus = xrandr14_get_gpus;
|
handler.get_gpus = xrandr14_get_gpus;
|
||||||
handler.pFreeGpus = xrandr14_free_gpus;
|
handler.get_adapters = xrandr14_get_adapters;
|
||||||
handler.pGetAdapters = xrandr14_get_adapters;
|
handler.get_monitors = xrandr14_get_monitors;
|
||||||
handler.pFreeAdapters = xrandr14_free_adapters;
|
handler.free_gpus = xrandr14_free_gpus;
|
||||||
handler.pGetMonitors = xrandr14_get_monitors;
|
handler.free_adapters = xrandr14_free_adapters;
|
||||||
handler.pFreeMonitors = xrandr14_free_monitors;
|
handler.free_monitors = xrandr14_free_monitors;
|
||||||
X11DRV_DisplayDevices_SetHandler( &handler );
|
X11DRV_DisplayDevices_SetHandler( &handler );
|
||||||
|
|
||||||
pXRRSelectInput( thread_init_display(), root_window,
|
pXRRSelectInput( thread_init_display(), root_window,
|
||||||
|
|
Loading…
Reference in New Issue