mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 10:40:39 +00:00
Take out windowClass from D3D struct
This commit is contained in:
parent
00cbf68e95
commit
6e689ec0f0
@ -577,6 +577,9 @@ static bool d3d_construct(d3d_video_t *d3d,
|
||||
void **input_data)
|
||||
{
|
||||
unsigned full_x, full_y;
|
||||
#ifdef HAVE_WINDOW
|
||||
WNDCLASSEX wndclass = {0};
|
||||
#endif
|
||||
driver_t *driver = driver_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
@ -602,22 +605,21 @@ static bool d3d_construct(d3d_video_t *d3d,
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_WINDOW) && !defined(_XBOX)
|
||||
memset(&d3d->windowClass, 0, sizeof(d3d->windowClass));
|
||||
|
||||
d3d->windowClass.cbSize = sizeof(d3d->windowClass);
|
||||
d3d->windowClass.style = CS_HREDRAW | CS_VREDRAW;
|
||||
d3d->windowClass.lpfnWndProc = WindowProc;
|
||||
d3d->windowClass.hInstance = NULL;
|
||||
d3d->windowClass.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
d3d->windowClass.lpszClassName = "RetroArch";
|
||||
d3d->windowClass.hIcon = LoadIcon(GetModuleHandle(NULL),
|
||||
wndclass.cbSize = sizeof(wndclass);
|
||||
wndclass.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wndclass.lpfnWndProc = WindowProc;
|
||||
wndclass.hInstance = NULL;
|
||||
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wndclass.lpszClassName = "RetroArch";
|
||||
wndclass.hIcon = LoadIcon(GetModuleHandle(NULL),
|
||||
MAKEINTRESOURCE(IDI_ICON));
|
||||
d3d->windowClass.hIconSm = (HICON)LoadImage(GetModuleHandle(NULL),
|
||||
wndclass.hIconSm = (HICON)LoadImage(GetModuleHandle(NULL),
|
||||
MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 16, 16, 0);
|
||||
if (!info->fullscreen)
|
||||
d3d->windowClass.hbrBackground = (HBRUSH)COLOR_WINDOW;
|
||||
wndclass.hbrBackground = (HBRUSH)COLOR_WINDOW;
|
||||
|
||||
RegisterClassEx(&d3d->windowClass);
|
||||
if (!RegisterClassEx(&wndclass))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MONITOR
|
||||
|
@ -98,9 +98,6 @@ typedef struct d3d_video
|
||||
bool quitting;
|
||||
|
||||
struct video_viewport vp;
|
||||
#ifdef HAVE_WINDOW
|
||||
WNDCLASSEX windowClass;
|
||||
#endif
|
||||
HWND hWnd;
|
||||
LPDIRECT3D g_pD3D;
|
||||
LPDIRECT3DDEVICE dev;
|
||||
|
Loading…
Reference in New Issue
Block a user