mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2025-02-17 19:19:16 +01:00
d3d9exhook: actually rotate the right monitor
This commit is contained in:
parent
5da6997805
commit
5969573dc9
@ -228,7 +228,8 @@ static HRESULT STDCALL my_CreateDeviceEx(
|
|||||||
ZeroMemory(&dm, sizeof(dm));
|
ZeroMemory(&dm, sizeof(dm));
|
||||||
dm.dmSize = sizeof(dm);
|
dm.dmSize = sizeof(dm);
|
||||||
|
|
||||||
if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm)) {
|
if (EnumDisplaySettings(
|
||||||
|
adapter_ident.DeviceName, ENUM_CURRENT_SETTINGS, &dm)) {
|
||||||
|
|
||||||
int32_t delta =
|
int32_t delta =
|
||||||
d3d9ex_force_orientation - dm.dmDisplayOrientation;
|
d3d9ex_force_orientation - dm.dmDisplayOrientation;
|
||||||
@ -242,12 +243,22 @@ static HRESULT STDCALL my_CreateDeviceEx(
|
|||||||
|
|
||||||
dm.dmDisplayOrientation = d3d9ex_force_orientation;
|
dm.dmDisplayOrientation = d3d9ex_force_orientation;
|
||||||
|
|
||||||
long cd_ret = ChangeDisplaySettings(&dm, CDS_FULLSCREEN);
|
long cd_ret = ChangeDisplaySettingsEx(
|
||||||
|
adapter_ident.DeviceName,
|
||||||
|
&dm,
|
||||||
|
NULL,
|
||||||
|
CDS_FULLSCREEN,
|
||||||
|
NULL);
|
||||||
|
|
||||||
if (cd_ret == DISP_CHANGE_SUCCESSFUL) {
|
if (cd_ret == DISP_CHANGE_SUCCESSFUL) {
|
||||||
log_info("Overriding rotation suceeded");
|
log_info(
|
||||||
|
"Overriding rotation suceeded: %s",
|
||||||
|
adapter_ident.DeviceName);
|
||||||
} else {
|
} else {
|
||||||
log_info("Overriding rotation failed");
|
log_info(
|
||||||
|
"Overriding rotation failed %s %ld",
|
||||||
|
adapter_ident.DeviceName,
|
||||||
|
cd_ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,6 +128,7 @@ void adapter_hook_override(const char *adapter_address)
|
|||||||
// empty, do nothing
|
// empty, do nothing
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen(adapter_address) > sizeof(IP_ADDRESS_STRING)) {
|
if (strlen(adapter_address) > sizeof(IP_ADDRESS_STRING)) {
|
||||||
log_warning(
|
log_warning(
|
||||||
"%s: %s is not an ipv4 address", __FUNCTION__, adapter_address);
|
"%s: %s is not an ipv4 address", __FUNCTION__, adapter_address);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user