address MR comments.
This commit is contained in:
@@ -228,10 +228,11 @@ static HRESULT STDCALL my_CreateDeviceEx(
|
|||||||
ZeroMemory(&dm, sizeof(dm));
|
ZeroMemory(&dm, sizeof(dm));
|
||||||
dm.dmSize = sizeof(dm);
|
dm.dmSize = sizeof(dm);
|
||||||
|
|
||||||
if (0 !=
|
if (EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm)) {
|
||||||
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm)) {
|
|
||||||
int32_t delta =
|
int32_t delta =
|
||||||
d3d9ex_force_orientation - dm.dmDisplayOrientation;
|
d3d9ex_force_orientation - dm.dmDisplayOrientation;
|
||||||
|
|
||||||
if (delta % 2 != 0) {
|
if (delta % 2 != 0) {
|
||||||
// swap height and width
|
// swap height and width
|
||||||
DWORD dwTemp = dm.dmPelsHeight;
|
DWORD dwTemp = dm.dmPelsHeight;
|
||||||
@@ -241,9 +242,9 @@ static HRESULT STDCALL my_CreateDeviceEx(
|
|||||||
|
|
||||||
dm.dmDisplayOrientation = d3d9ex_force_orientation;
|
dm.dmDisplayOrientation = d3d9ex_force_orientation;
|
||||||
|
|
||||||
long lRet = ChangeDisplaySettings(&dm, CDS_FULLSCREEN);
|
long cd_ret = ChangeDisplaySettings(&dm, CDS_FULLSCREEN);
|
||||||
|
|
||||||
if (lRet == DISP_CHANGE_SUCCESSFUL) {
|
if (cd_ret == DISP_CHANGE_SUCCESSFUL) {
|
||||||
log_info("Overriding rotation suceeded");
|
log_info("Overriding rotation suceeded");
|
||||||
} else {
|
} else {
|
||||||
log_info("Overriding rotation failed");
|
log_info("Overriding rotation failed");
|
||||||
@@ -256,8 +257,6 @@ static HRESULT STDCALL my_CreateDeviceEx(
|
|||||||
hr = IDirect3D9Ex_CreateDeviceEx(
|
hr = IDirect3D9Ex_CreateDeviceEx(
|
||||||
real, adapter, type, hwnd, flags, pp, fdm, pdev);
|
real, adapter, type, hwnd, flags, pp, fdm, pdev);
|
||||||
|
|
||||||
// TODO stuff
|
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
#ifndef HOOKLIB_ADAPTER_H
|
#ifndef HOOKLIB_ADAPTER_H
|
||||||
#define HOOKLIB_ADAPTER_H
|
#define HOOKLIB_ADAPTER_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hooks GetAdaptersInfo to attempt only returning 1 adapter.
|
||||||
|
*
|
||||||
|
*/
|
||||||
void adapter_hook_init(void);
|
void adapter_hook_init(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uses the provided address to try and match a network adapter
|
* Uses the provided address to try and match a network adapter.
|
||||||
|
* This adapter is then returned as the only adapter.
|
||||||
*
|
*
|
||||||
* @param network ip to match
|
* @param network ip to match
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user