clang-format pass
This commit is contained in:
@@ -150,13 +150,15 @@ void iidxhook_config_gfx_init(struct cconfig *config)
|
||||
config,
|
||||
IIDXHOOK_CONFIG_GFX_FORCED_RR_KEY,
|
||||
IIDXHOOK_CONFIG_GFX_DEFAULT_FORCED_RR_VALUE,
|
||||
"Forced refresh rate, -1 to not force any (try 59 or 60 if monitor check fails to lock on high refresh rate monitors)");
|
||||
"Forced refresh rate, -1 to not force any (try 59 or 60 if monitor "
|
||||
"check fails to lock on high refresh rate monitors)");
|
||||
|
||||
cconfig_util_set_int(
|
||||
config,
|
||||
IIDXHOOK_CONFIG_GFX_DEVICE_ADAPTER_KEY,
|
||||
IIDXHOOK_CONFIG_GFX_DEFAULT_DEVICE_ADAPTER_VALUE,
|
||||
"D3D9 device adapter (monitor), 0 (D3DADAPTER_DEFAULT) to use default, 1, 2 etc. to use specified adapter");
|
||||
"D3D9 device adapter (monitor), 0 (D3DADAPTER_DEFAULT) to use default, "
|
||||
"1, 2 etc. to use specified adapter");
|
||||
}
|
||||
|
||||
void iidxhook_config_gfx_get(
|
||||
@@ -372,6 +374,7 @@ void iidxhook_config_gfx_get(
|
||||
"to default '%d'",
|
||||
IIDXHOOK_CONFIG_GFX_DEVICE_ADAPTER_KEY,
|
||||
IIDXHOOK_CONFIG_GFX_DEFAULT_DEVICE_ADAPTER_VALUE);
|
||||
config_gfx->device_adapter = IIDXHOOK_CONFIG_GFX_DEFAULT_DEVICE_ADAPTER_VALUE;
|
||||
config_gfx->device_adapter =
|
||||
IIDXHOOK_CONFIG_GFX_DEFAULT_DEVICE_ADAPTER_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,14 +269,22 @@ static void iidxhook_util_d3d9_fix_create_device_apply_window_mode(
|
||||
pp->FullScreen_RefreshRateInHz = 0;
|
||||
} else {
|
||||
if (iidxhook_util_d3d9_config.forced_refresh_rate > 0) {
|
||||
log_info("Forcing refresh rate %d -> %d", pp->FullScreen_RefreshRateInHz, iidxhook_util_d3d9_config.forced_refresh_rate);
|
||||
pp->FullScreen_RefreshRateInHz = iidxhook_util_d3d9_config.forced_refresh_rate;
|
||||
log_info(
|
||||
"Forcing refresh rate %d -> %d",
|
||||
pp->FullScreen_RefreshRateInHz,
|
||||
iidxhook_util_d3d9_config.forced_refresh_rate);
|
||||
pp->FullScreen_RefreshRateInHz =
|
||||
iidxhook_util_d3d9_config.forced_refresh_rate;
|
||||
}
|
||||
}
|
||||
|
||||
if (iidxhook_util_d3d9_config.device_adapter != D3DADAPTER_DEFAULT) {
|
||||
log_info("Forcing adapter %d -> %d", irp->args.ctx_create_device.adapter, iidxhook_util_d3d9_config.device_adapter);
|
||||
irp->args.ctx_create_device.adapter = iidxhook_util_d3d9_config.device_adapter;
|
||||
log_info(
|
||||
"Forcing adapter %d -> %d",
|
||||
irp->args.ctx_create_device.adapter,
|
||||
iidxhook_util_d3d9_config.device_adapter);
|
||||
irp->args.ctx_create_device.adapter =
|
||||
iidxhook_util_d3d9_config.device_adapter;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -162,13 +162,15 @@ struct iidxhook_util_d3d9_config {
|
||||
|
||||
/**
|
||||
* Forced refresh rate
|
||||
* -1 to not force any (try 59 or 60 if monitor check fails to lock on high refresh rate monitors)
|
||||
* -1 to not force any (try 59 or 60 if monitor check fails to lock on high
|
||||
* refresh rate monitors)
|
||||
*/
|
||||
int32_t forced_refresh_rate;
|
||||
|
||||
/**
|
||||
* override device adapter (monitor)
|
||||
* 0 (D3DADAPTER_DEFAULT) to use default (whatever the game sends), 1, 2 etc. to use specified adapter
|
||||
* 0 (D3DADAPTER_DEFAULT) to use default (whatever the game sends), 1, 2
|
||||
* etc. to use specified adapter
|
||||
*/
|
||||
int32_t device_adapter;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user