diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index de1507ea26..81b61895a5 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -27,11 +27,16 @@ #include #include #include "../../retroarch.h" +#include "../video_thread_wrapper.h" #ifdef HAVE_OPENGL #include "../drivers_wm/win32_shader_dlg.h" #endif +#ifdef HAVE_D3D +#include "../d3d/d3d.h" +#endif + #ifdef __cplusplus extern "C" #endif @@ -46,6 +51,8 @@ bool g_quit; HWND g_hwnd; extern void *dinput_wgl; +extern void *curD3D; +extern void *dinput; /* Power Request APIs */ @@ -194,7 +201,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, else if (!strcmp(video_driver, "d3d")) { LPCREATESTRUCT p_cs = (LPCREATESTRUCT)lparam; - curD3D = (d3d_video_t*)p_cs->lpCreateParams; + curD3D = p_cs->lpCreateParams; } return 0; @@ -454,7 +461,7 @@ void win32_show_cursor(bool state) #endif } -void win32_check_window(bool *quit, unsigned *resize, unsigned *width, unsigned *height) +void win32_check_window(bool *quit, bool *resize, unsigned *width, unsigned *height) { #ifndef _XBOX MSG msg; diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 936eaabcce..5dd0b239df 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -69,7 +69,7 @@ bool win32_get_metrics(void *data, void win32_show_cursor(bool state); void win32_check_window(bool *quit, - unsigned *resize, unsigned *width, unsigned *height); + bool *resize, unsigned *width, unsigned *height); #ifdef __cplusplus } diff --git a/gfx/drivers_context/d3d_ctx.cpp b/gfx/drivers_context/d3d_ctx.cpp index bc7a6a787a..07c3ac78eb 100644 --- a/gfx/drivers_context/d3d_ctx.cpp +++ b/gfx/drivers_context/d3d_ctx.cpp @@ -45,8 +45,8 @@ static bool widescreen_mode = false; #endif -static d3d_video_t *curD3D = NULL; -static void *dinput; +void *curD3D = NULL; +void *dinput; extern bool d3d_restore(d3d_video_t *data);