forked from Dniel97/segatools
gfxhook: Fix some clang-tidy warnings
This commit is contained in:
parent
0702c306a6
commit
db5b264155
@ -1,7 +1,6 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "gfxhook/config.h"
|
||||
|
@ -3,13 +3,11 @@
|
||||
#include <d3d11.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gfxhook/gfx.h"
|
||||
#include "gfxhook/util.h"
|
||||
|
||||
#include "hook/com-proxy.h"
|
||||
#include "hook/table.h"
|
||||
|
||||
#include "hooklib/dll.h"
|
||||
@ -157,8 +155,8 @@ HRESULT WINAPI D3D11CreateDeviceAndSwapChain(
|
||||
{
|
||||
DXGI_SWAP_CHAIN_DESC *desc;
|
||||
HWND hwnd;
|
||||
LONG width;
|
||||
LONG height;
|
||||
UINT width;
|
||||
UINT height;
|
||||
|
||||
dprintf("D3D11: D3D11CreateDeviceAndSwapChain hook hit\n");
|
||||
|
||||
@ -172,8 +170,6 @@ HRESULT WINAPI D3D11CreateDeviceAndSwapChain(
|
||||
height = desc->BufferDesc.Height;
|
||||
} else {
|
||||
hwnd = NULL;
|
||||
width = 0;
|
||||
height = 0;
|
||||
}
|
||||
|
||||
if (hwnd != NULL) {
|
||||
|
@ -2,7 +2,6 @@
|
||||
#include <d3d9.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "hook/com-proxy.h"
|
||||
@ -10,7 +9,6 @@
|
||||
|
||||
#include "hooklib/dll.h"
|
||||
|
||||
#include "gfxhook/config.h"
|
||||
#include "gfxhook/gfx.h"
|
||||
#include "gfxhook/util.h"
|
||||
|
||||
@ -103,8 +101,6 @@ fail:
|
||||
if (d3d9 != NULL) {
|
||||
FreeLibrary(d3d9);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
IDirect3D9 * WINAPI Direct3DCreate9(UINT sdk_ver)
|
||||
|
@ -284,8 +284,8 @@ static HRESULT STDMETHODCALLTYPE my_IDXGIFactory_CreateSwapChain(
|
||||
struct com_proxy *proxy;
|
||||
IDXGIFactory *real;
|
||||
HWND hwnd;
|
||||
LONG width;
|
||||
LONG height;
|
||||
UINT width;
|
||||
UINT height;
|
||||
|
||||
dprintf("DXGI: IDXGIFactory::CreateSwapChain hook hit\n");
|
||||
|
||||
@ -300,8 +300,6 @@ static HRESULT STDMETHODCALLTYPE my_IDXGIFactory_CreateSwapChain(
|
||||
height = desc->BufferDesc.Height;
|
||||
} else {
|
||||
hwnd = NULL;
|
||||
width = 0;
|
||||
height = 0;
|
||||
}
|
||||
|
||||
if (hwnd != NULL) {
|
||||
@ -323,8 +321,8 @@ static HRESULT STDMETHODCALLTYPE my_IDXGIFactory_CreateSwapChain(
|
||||
HWND_TOP,
|
||||
0,
|
||||
0,
|
||||
width,
|
||||
height,
|
||||
(int) width,
|
||||
(int) height,
|
||||
SWP_FRAMECHANGED | SWP_NOSENDCHANGING);
|
||||
|
||||
ShowWindow(hwnd, SW_SHOWMAXIMIZED);
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gfxhook/config.h"
|
||||
|
@ -1,7 +1,5 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "gfxhook/util.h"
|
||||
|
||||
#include "util/dprintf.h"
|
||||
@ -16,7 +14,7 @@ void gfx_util_ensure_win_visible(HWND hwnd)
|
||||
ShowWindow(hwnd, SW_RESTORE);
|
||||
}
|
||||
|
||||
void gfx_util_borderless_fullscreen_windowed(HWND hwnd, LONG width, LONG height)
|
||||
void gfx_util_borderless_fullscreen_windowed(HWND hwnd, UINT width, UINT height)
|
||||
{
|
||||
BOOL ok;
|
||||
HRESULT hr;
|
||||
@ -31,8 +29,8 @@ void gfx_util_borderless_fullscreen_windowed(HWND hwnd, LONG width, LONG height)
|
||||
HWND_TOP,
|
||||
0,
|
||||
0,
|
||||
width,
|
||||
height,
|
||||
(int) width,
|
||||
(int) height,
|
||||
SWP_FRAMECHANGED | SWP_NOSENDCHANGING);
|
||||
|
||||
if (!ok) {
|
||||
|
@ -3,5 +3,5 @@
|
||||
#include <windows.h>
|
||||
|
||||
void gfx_util_ensure_win_visible(HWND hwnd);
|
||||
void gfx_util_borderless_fullscreen_windowed(HWND hwnd, LONG width, LONG height);
|
||||
void gfx_util_borderless_fullscreen_windowed(HWND hwnd, UINT width, UINT height);
|
||||
HRESULT gfx_util_frame_window(HWND hwnd);
|
||||
|
@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user