From 7394913f111564ba478b2b4eb14fba4ba7743670 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 Nov 2015 11:02:18 +0100 Subject: [PATCH] (360) WNDCLASSEX not available --- gfx/common/win32_common.cpp | 7 ++++++- gfx/common/win32_common.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gfx/common/win32_common.cpp b/gfx/common/win32_common.cpp index a9b122f777..db33f887fa 100644 --- a/gfx/common/win32_common.cpp +++ b/gfx/common/win32_common.cpp @@ -245,9 +245,14 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, return DefWindowProc(hwnd, message, wparam, lparam); } -bool win32_window_init(WNDCLASSEX *wndclass, bool fullscreen) +bool win32_window_init(void *data, bool fullscreen) { #ifndef _XBOX + WNDCLASSEX *wndclass = (WNDCLASSEX*)data; + + if (!wndclass) + return false; + wndclass->cbSize = sizeof(WNDCLASSEX); wndclass->style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; wndclass->lpfnWndProc = WndProc; diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index db2b8758d2..e2915c8731 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -59,7 +59,7 @@ bool win32_set_video_mode(void *data, bool win32_monitor_set_fullscreen(unsigned width, unsigned height, unsigned refresh, char *dev_name); -bool win32_window_init(WNDCLASSEX *wndclass, bool fullscreen); +bool win32_window_init(void *wndclass, bool fullscreen); bool win32_window_create(void *data, unsigned style, RECT *mon_rect, unsigned width,